Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: How to determine if 'strict' is enabled

by ikegami (Patriarch)
on Jun 07, 2023 at 03:58 UTC ( [id://11152672]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -le'no strict;      print $INC{ "strict.pm" } ?1:0'
    1   # False positive
    ...
    
    $ perl -le'use v5.20;      print $INC{ "strict.pm" } ?1:0'
    0   # False negative
    
  2. or download this
    $ perl -le'
       sub f { ( ( caller(0) )[8] & 0x602 ) == 0x602 }
    ...
       print f ?1:0;
    '
    1
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-04-14 01:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found