Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: The 'eval "require $module; 1"' idiom

by davido (Archbishop)
on Apr 19, 2014 at 17:04 UTC ( #1082906=note: print w/ replies, xml ) Need Help??


in reply to Re^2: The 'eval "require $module; 1"' idiom
in thread The 'eval "require $module; 1"' idiom

I wish the grep.cpan.me supported lookaheads and lookbehinds, which would allow me to search a little more specifically for situations where the idiom is used outside of the "require" and "use" use case. If it did, I might try something like:

if \(eval ["'](?!require|use).+?;\s*1;?["']

Dave


Comment on Re^3: The 'eval "require $module; 1"' idiom
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2015-07-07 10:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls