Skip Menu |

This queue is for tickets about the Devel-ptkdb CPAN distribution.

Report information
The Basics
Id: 4864
Status: new
Priority: 0/
Queue: Devel-ptkdb

People
Owner: Nobody in particular
Requestors: Marek.Rouchal [...] gmx.net
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.1087
Fixed in: (no value)



Subject: options for restart
As my previous "unsolicited patch" was nevertheless done, I try again with this one: Some of my scripts here have special headers that require to start the script with "perl -x <scriptname>". When restarting the program from ptkdb, the fixed options '-w -d:ptkdb' are used, and I cannot get the '-x' in. The fix below introduces the environment PTKDB_PERL5OPT (default is -w) that allows the user to specify these options. Along with that, I changed 'perl' to $^X, which seems to be a better choice for getting the correct perl interpreter binary (imaging you have two perls in your $PATH and you call the second one with absolute path...). See also perlvar. Sincerely hope that this helps, Marek diff -ruN Devel-ptkdb-1.1087/ptkdb.pm Devel-ptkdb-1.1087.p1/ptkdb.pm --- Devel-ptkdb-1.1087/ptkdb.pm 2003-11-22 20:29:04.000000000 +0100 +++ Devel-ptkdb-1.1087.p1/ptkdb.pm 2004-01-08 09:54:13.000000000 +0100 @@ -523,6 +523,11 @@ Sets the color that highlights the line where the debugger is stopped +=item PTKDB_PERL5OPT + +When restarting the program, pass these options to the perl interpreter +(determined by C<$^X>, see L<perlvar/$^X>). Default is C<-w>. + =back =head1 FILES @@ -3484,7 +3489,8 @@ ## build up the command to do the restart ## - $fname = "perl -w -d:ptkdb $Devel::ptkdb::scriptName @Devel::ptkdb::script_args" ; + $fname = $^X . ' ' . ($ENV{PTKDB_PERL5OPT} || '-w') . + " -d:ptkdb $Devel::ptkdb::scriptName @Devel::ptkdb::script_args" ; # print "$$ doing a restart with $fname\n" ;