From: Jarkko Hietaniemi Date: Mon, 5 May 2003 16:14:09 +0000 (+0000) Subject: Re: Minor change to strict.pm. Who? How? X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=08d31bcd142b90ebd3b97b5ea6f954896723ca96;p=p5sagit%2Fp5-mst-13.2.git Re: Minor change to strict.pm. Who? How? From: Adam Kennedy Date: Wed, 30 Apr 2003 00:02:40 +1000 Message-ID: <3EAE8600.2000806@ali.as> Subject: [PATCH] Re: Minor change to strict.pm. Who? How? From: Michael G Schwern Date: Tue, 29 Apr 2003 12:26:32 -0700 Message-ID: <20030429192632.GA6129@windhund.schwern.org> p4raw-id: //depot/perl@19427 --- diff --git a/lib/strict.pm b/lib/strict.pm index d1479ed..591fa39 100644 --- a/lib/strict.pm +++ b/lib/strict.pm @@ -1,6 +1,6 @@ package strict; -$strict::VERSION = "1.02"; +$strict::VERSION = "1.03"; my %bitmask = ( refs => 0x00000002, @@ -22,14 +22,16 @@ sub bits { $bits; } +my $default_bits = bits(qw(refs subs vars)); + sub import { shift; - $^H |= bits(@_ ? @_ : qw(refs subs vars)); + $^H |= @_ ? bits(@_) : $default_bits; } sub unimport { shift; - $^H &= ~ bits(@_ ? @_ : qw(refs subs vars)); + $^H &= ~ (@_ ? bits(@_) : $default_bits); } 1;