Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: 'use strict' without a semicolon can be interesting

by toma (Vicar)
on Jul 13, 2010 at 18:20 UTC ( #849341=note: print w/ replies, xml ) Need Help??


in reply to Re: 'use strict' without a semicolon can be interesting
in thread 'use strict' without a semicolon can be interesting

Perhaps there are a limited number of strictures that use strict knows about. Perl could compare the EXPR list against the known list of possible strictures, and throw an error or warning if the EXPR is not on the list.

I don't know if this is feasible to implement without deep changes, but it does seem possible.

You are right, I meant perl 5.12.1!

It should work perfectly the first time! - toma


Comment on Re^2: 'use strict' without a semicolon can be interesting
Select or Download Code
Re^3: 'use strict' without a semicolon can be interesting
by ikegami (Pope) on Jul 13, 2010 at 18:30 UTC

    It already does that.

    $ perl -e'use strict "foo"' Unknown 'strict' tag(s) 'foo' at -e line 1 BEGIN failed--compilation aborted at -e line 1.

    You passed an empty list which is perfectly valid (i.e. the same as use strict;).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://849341]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2014-09-21 09:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (168 votes), past polls