diff options
Diffstat (limited to 'dist/if/if.pm')
-rw-r--r-- | dist/if/if.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/dist/if/if.pm b/dist/if/if.pm index b118302714..a18f8fcf8c 100644 --- a/dist/if/if.pm +++ b/dist/if/if.pm @@ -1,11 +1,13 @@ package if; -$VERSION = '0.0604'; +$VERSION = '0.0605'; sub work { my $method = shift() ? 'import' : 'unimport'; - die "Too few arguments to 'use if' (some code returning an empty list in list context?)" - unless @_ >= 2; + unless (@_ >= 2) { + my $type = ($method eq 'import') ? 'use' : 'no'; + die "Too few arguments to '$type if' (some code returning an empty list in list context?)" + } return unless shift; # CONDITION my $p = $_[0]; # PACKAGE @@ -102,4 +104,3 @@ based on what version of Perl is running. Ilya Zakharevich L<mailto:ilyaz@cpan.org>. =cut - |