Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > media > contrib-release-src > by-pkgid > 5c4d3b4afec86052dc1792c46876c957 > files > 15

perl-CGI-FormMagick-0.91-6mdv2009.0.src.rpm

Index: perl-CGI-FormMagick/perl-CGI-FormMagick.spec
diff -u perl-CGI-FormMagick/lib/CGI/FormMagick/Sub.pm:1.3 perl-CGI-FormMagick/lib/CGI/FormMagick/Sub.pm:1.4
--- perl-CGI-FormMagick/lib/CGI/FormMagick/Sub.pm:1.3	Thu Jul 15 10:52:00 2004
+++ perl-CGI-FormMagick/lib/CGI/FormMagick/Sub.pm	Fri Aug 20 19:42:07 2004
@@ -254,10 +254,14 @@
     no strict 'refs'; # Into the Evil Cavern... mwahahahahaaaaaa
     if ($package)
     {
-        my $package_symbols = *{$package . '::'}{HASH};
-        if (exists $package_symbols->{$sub})
+        my %package_symbols = %{$package . '::'};
+        if (exists $package_symbols{$sub})
         {
-            return $package_symbols->{$sub};
+            # Make sure it's a subroutine.
+            if (defined &{ $package_symbols{$sub} })
+            {
+                return $package_symbols{$sub};
+            }
         }
     }
     if ($self && $self->can($sub))