[perl-Glib-Object-Introspection] Fix the existence test for subs



commit 6f385a9dd51309ff4b4993f341927a49a33065b0
Author: Torsten SchÃnfeld <kaffeetisch gmx de>
Date:   Sat Sep 10 23:20:59 2011 +0200

    Fix the existence test for subs
    
    We used to test 'defined *{Foo::bar}'.  But that's already true if the programs
    contains a simple invocation 'Foo::bar()' somewhere.  Use 'defined &{Foo::bar}'
    instead.

 lib/Glib/Object/Introspection.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lib/Glib/Object/Introspection.pm b/lib/Glib/Object/Introspection.pm
index 4f925a2..ef5efa5 100644
--- a/lib/Glib/Object/Introspection.pm
+++ b/lib/Glib/Object/Introspection.pm
@@ -77,7 +77,7 @@ sub setup {
       my $corrected_name = exists $name_corrections->{$auto_name}
         ? $name_corrections->{$auto_name}
         : $auto_name;
-      if (defined *{$corrected_name}) {
+      if (defined &{$corrected_name}) {
         next NAME;
       }
       *{$corrected_name} = _create_invoker_sub (



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]