Change 17799 by [EMAIL PROTECTED] on 2002/08/29 11:48:39

        Subject: Re: if.pm bug.
        From: "Steffen Mueller" <[EMAIL PROTECTED]>
        Date: Sun, 25 Aug 2002 00:27:59 +0200
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

.... //depot/perl/lib/if.pm#2 edit

Differences ...

==== //depot/perl/lib/if.pm#2 (text) ====
Index: perl/lib/if.pm
--- perl/lib/if.pm#1~14694~     Thu Feb 14 13:54:43 2002
+++ perl/lib/if.pm      Thu Aug 29 04:48:39 2002
@@ -1,13 +1,16 @@
 package if;
 
-our $VERSION = '0.01';
+our $VERSION = '0.02';
 
 sub work {
   my $method = shift() ? 'import' : 'unimport';
   return unless shift;         # CONDITION
-  my $p = shift;               # PACKAGE
+
+  my $p = $_[0];               # PACKAGE
   eval "require $p" or die;    # Adds .pm etc if needed
-  $p->$method(@_) if $p->can($method);
+
+  my $m = $p->can($method);
+  goto &$m if $m;
 }
 
 sub import   { shift; unshift @_, 1; goto &work }
End of Patch.

Reply via email to