Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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. Best.pm also has some goodies for conditional module loading that may suit your needs.


Comment on Re: How was my script launched?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (14)
As of 2014-09-19 14:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (140 votes), past polls