Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Finding what args were passed to the perl interpretter ?

by dpuu (Chaplain)
on Nov 19, 2008 at 23:24 UTC ( [id://724759]=note: print w/replies, xml ) Need Help??


in reply to Re: Finding what args were passed to the perl interpretter ?
in thread Finding what args were passed to the perl interpretter ?

Thanks for the reply. Unfortunately, that doesn't seem applicable to the problem I was trying to solve (which I guess I didn't state in my original post): the ultimate goal was for a script to detect that it was being run under -d:NYTProf, and to add that option (and other similar things) to various child perl-scripts that it runs.
--Dave
Opinions my own; statements of fact may be in error.

Replies are listed 'Best First'.
Re^3: Finding what args were passed to the perl interpretter ?
by JavaFan (Canon) on Nov 20, 2008 at 00:26 UTC
    I don't think there's a general way to get the arguments to perl from with Perl. However, an XS routine may be able to access argv and argc (although I've no idea whether perl itself leaves them as is).

    As for your specific request, detecting -d:NYTProf, it may be done. One of the effects of -d:foo is that it loads Devel::foo, and calls Devel::foo -> import. You may want to try to mask Devel::NYTProf::import.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-25 20:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found