Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: How to load the subs without running the script

by jethro (Monsignor)
on Aug 03, 2010 at 22:32 UTC ( #852763=note: print w/replies, xml ) Need Help??


in reply to SOLVED: How to load the subs without running the script

Another possibility: Override exit() before you do or eval monster.pl.

> perl -e ' use subs qw(exit); sub exit {}; exit(1); print "yes\n";' yes

There is more than one way to override a builtin function in perl, this one is described in http://modperlbook.org/html/6-4-1-exit.html

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2018-12-16 08:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many stories does it take before you've heard them all?







    Results (70 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!