summaryrefslogtreecommitdiff
path: root/lib/if.pm
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2003-11-29 20:53:23 +0000
committerNicholas Clark <nick@ccl4.org>2003-11-29 20:53:23 +0000
commit2f761939c78ba722e65a7f4b11072697cd8b1848 (patch)
tree642a1dfc6e9daaa8ac2837fc9838332c083da059 /lib/if.pm
parent66b6773e238d515b739774e0d4f0e37f0f95d2b5 (diff)
downloadperl-2f761939c78ba722e65a7f4b11072697cd8b1848.tar.gz
Integrate if.pm 0.0401
Needed to edit the test file as t/TEST can't cope with extra output lines as produced by 0.0401's if.t p4raw-id: //depot/perl@21814
Diffstat (limited to 'lib/if.pm')
-rw-r--r--lib/if.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/if.pm b/lib/if.pm
index 9e140c37d6..700149f625 100644
--- a/lib/if.pm
+++ b/lib/if.pm
@@ -1,6 +1,6 @@
package if;
-$VERSION = '0.04';
+$VERSION = '0.0401';
sub work {
my $method = shift() ? 'import' : 'unimport';
@@ -8,8 +8,7 @@ sub work {
my $p = $_[0]; # PACKAGE
(my $file = "$p.pm") =~ s!::!/!g;
- require $file;
-
+ require $file; # Works even if $_[0] is a keyword (like open)
my $m = $p->can($method);
goto &$m if $m;
}