in reply to Emacs, perldb - edit cmd line args from within


As a workaround you could set a breakpoint on the first line in the program and then overwrite the @ARGV values manually:
DB<1> x @ARGV 0 'bar' DB<2> $ARGV[0] = 'foo' DB<3> x @ARGV 0 'foo'

--
John.

Replies are listed 'Best First'.
Re^2: Emacs, perldb - edit cmd line args from within
by Ray Smith (Beadle) on Feb 17, 2006 at 22:24 UTC
    Your workaround is a good idea. The perldb command "R" does indeed automatically stop at the beginning so one can edit the contents of @ARGV. But it would be nice to work in the command line style, specially if one might be able to cut and past in a new command line. It seems strange that perldb allows you to make source code changes and restart and it doesn't support some hack to support updating the command line. I suppose one could create some sort of function that would populate @ARGS that could be invoked before continguing - e.g. > cmdfix("-foo bar") but that just doesn't seem very elegant.