Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by toma (Vicar)
on Jul 13, 2010 at 18:20 UTC ( [id://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

Replies are listed 'Best First'.
Re^3: 'use strict' without a semicolon can be interesting
by ikegami (Patriarch) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://849341]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-12-13 02:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which IDE have you been most impressed by?













    Results (67 votes). Check out past polls.