|Perl: the Markov chain saw|
Should options in the shebang line generally behave like switches given in the commandline?by hexcoder (Chaplain)
|on Jan 29, 2010 at 11:27 UTC||Need Help??|
hexcoder has asked for the
wisdom of the Perl Monks concerning the following question:
while preparing a test case for the perl debugger of perl 5.11.3, i tried to use the '-d' switch in the shebang line of my testscript. I did that in order to make the script selfcontained.
perlrun suggests there is no difference in switches given in the commandline and the shebang line.
However when i started the script without the commandline switch '-d', the initialization for the debugger was incomplete. All line information seemed to be lacking.
Here is the script, which uses some debugger type ahead commands to make it self contained.
[Update: I exchanged the originally wrong script with the right one, sorry.]
Here is a session without the -d commandline option. No line information is available. I checked this also interactively with the 'l' debugger command. There is no output. The %DB::dbline hash has not been set up.
Here is the same session with a -d commandline parameter:
From my point of view switch processing should be the same in both cases.
Ok, now for the question: Can some kind monk point me to the location in the Perl source, where shebang option processing is taking place? I try to find a fix then.
Thanks a lot, hexcoder