-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
strict.pm not strict enough #1083
Comments
From gbacon@itsc.uah.eduA post on clpmisc today contained something like #! /usr/bin/perl -w $, = ' '; # set output field separator $foo = 42; That shouldn't compile, right? Notice that there's no comma after foreach my $s (@_){ $bits |= $bitmask{$s} || 0; }; IOW, C<use strict 'foobletch';> is a nop. I can see how one might This is also the case for 5.00503. Perl Info
|
From [Unknown Contact. See original ticket]In message <200001252125.PAA01722@ruby.itsc.uah.edu>, : Notice that there's no comma after C<use strict>. Errr.. s/comma/semicolon/ Greg |
From [Unknown Contact. See original ticket]See <URL:http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2000-01/msg01175.html> This should also apply against 5.00503's strict.pm. [6:49] ruby% diff -u strict.pm.63 strict.pm Inline Patch--- strict.pm.63 Wed Jan 26 06:40:54 2000
+++ strict.pm Wed Jan 26 06:49:18 2000
@@ -19,8 +19,8 @@
If no import list is supplied, all possible restrictions are assumed.
(This is the safest mode to operate in, but is sometimes too strict for
-casual programming.) Currently, there are three possible things to be
-strict about: "subs", "vars", and "refs".
+casual programming.) Currently, there are three possible strictures:
+"subs", "vars", and "refs".
=over 6
@@ -90,7 +90,15 @@
sub bits {
my $bits = 0;
- foreach my $s (@_){ $bits |= $bitmask{$s} || 0; };
+ foreach my $s (@_) {
+ if ($bitmask{$s}) {
+ $bits |= $bitmask{$s};
+ }
+ else {
+ require Carp;
+ Carp::carp("Unknown stricture `$s'");
+ }
+ }
$bits;
}
End of Patch. |
From @jhiuse strict 'use strict'? :-) -- |
From [Unknown Contact. See original ticket]Greg Bacon <gbacon@itsc.uah.edu> wrote
This is a deliberate feature - see the last time this was discussed use strict 'new_feature_introduced_in_perl6'; and still have the module usable under perl5 (but without the new check Mike Guy |
From [Unknown Contact. See original ticket]Greg Bacon <gbacon@itsc.uah.edu> wrote Don't do that - see my previous message. A check that the argument was a valid word might be a good idea, tho'. Mike Guy |
From [Unknown Contact. See original ticket]
I like this for: use less 'whitespace'; Sadly, I can't seem to make use fewer 'keystrokes'; work right. :-) --tom |
From [Unknown Contact. See original ticket]In message <E12DXpx-0005qe-00@ursa.cus.cam.ac.uk>, : A check that the argument was a valid word might be a good idea, tho'. There is no compatibility problem. It spits out a warning. Regardless Greg |
From The RT System itselfConsensus appears to be not to change this. Closing. |
Migrated from rt.perl.org#2036 (status was 'resolved')
Searchable as RT2036$
The text was updated successfully, but these errors were encountered: