Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: How was my script launched?

by gaal (Parson)
on Jul 20, 2008 at 17:25 UTC ( #698923=note: print w/replies, xml ) Need Help??

in reply to How was my script launched?

It's not the socket that invokes your script, it's a web server or some other server process. Perhaps you can configure them to pass a command line argument. In the case of CGI, you typically have cgi environment variables set up for you that you might try to detect.

In many cases, you can replace "use" with runtime "require Foo; Foo->import(ARGS)", which you can of course predicate on the method you detected you were called with. also has some goodies for conditional module loading that may suit your needs.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2016-10-21 01:50 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (284 votes). Check out past polls.