diff options
author | Elizabeth Mattijsen <liz@dijkmat.nl> | 2002-09-06 19:31:02 +0000 |
---|---|---|
committer | hv <hv@crypt.org> | 2002-09-08 15:46:08 +0000 |
commit | 210bfd0c35c99ac9c680d43346a302335cf8c627 (patch) | |
tree | 6f6bd999399fadab5ebb29efe756362327ec3c47 /lib/strict.pm | |
parent | f467b3b7e0bdb2ee52eb95365ea30c7918b8930f (diff) | |
download | perl-210bfd0c35c99ac9c680d43346a302335cf8c627.tar.gz |
[perl #17061] no strict 'garbage'
From: Elizabeth Mattijsen (via RT) <perlbug@perl.org>
Date: 6 Sep 2002 19:31:02 -0000
Message-Id: <rt-17061-36808.6.19994322284541@bugs6.perl.org>
Date: Sat, 07 Sep 2002 13:40:22 +0200
Message-Id: <4.2.0.58.20020907133846.02476d40@mickey.dijkmat.nl>
p4raw-id: //depot/perl@17869
Diffstat (limited to 'lib/strict.pm')
-rw-r--r-- | lib/strict.pm | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/strict.pm b/lib/strict.pm index 737cb18b1a..c89edbf00f 100644 --- a/lib/strict.pm +++ b/lib/strict.pm @@ -100,7 +100,19 @@ vars => 0x00000400 sub bits { my $bits = 0; - foreach my $s (@_){ $bits |= $bitmask{$s} || 0; }; + my @wrong; + foreach my $s (@_) { + push @wrong, $s unless exists $bitmask{$s}; + $bits |= $bitmask{$s} || 0; + } + if (@wrong) { + my $useno = { + __PACKAGE__.'::import' => 'use', + __PACKAGE__.'::unimport' => 'no' + }->{ (caller(1))[3] }; + require Carp; + Carp::croak("Don't know how to '$useno ".__PACKAGE__." qw(@wrong)'"); + } $bits; } |