Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

make a required script exit script

by Anonymous Monk
on Feb 09, 2006 at 16:41 UTC ( [id://529131]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: make a required script exit script
by Roy Johnson (Monsignor) on Feb 09, 2006 at 16:45 UTC
    When I require a file that calls exit, the whole program stops, just like I expected. Have you tried that?

    Caution: Contents may have been coded under pressure.
Re: make a required script exit script
by swkronenfeld (Hermit) on Feb 09, 2006 at 16:48 UTC
    Have you tried exiting in the required script?

    test.pl
    #!/usr/bin/perl -w use strict; require "test2.pl"; print "Shouldn't ever print me!\n";


    test2.pl
    #!/usr/bin/perl -w use strict; print "In required\n"; exit;


    Test it
    > ./test.pl In required >
Re: make a required script exit script
by Fletch (Bishop) on Feb 09, 2006 at 16:46 UTC

    What happened when you tried calling exit in the required code?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://529131]
Approved by Roy Johnson
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-25 07:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found