pmg has asked for the wisdom of the Perl Monks concerning the following question:

I am using autobox::Core and want to be able to evaluate expressions using the debugger
eg "42"->print
To get the debugger to work without having to use
eval { use autobox::Core ; "42"->print }
I have had to change the debugger
@res = eval "$usercontext ; use autobox::Core ; $evalarg;\n"; # '\n' for nice recursive debug

Is there a better way of doing this?

Replies are listed 'Best First'.
Re: autobox::Core in the debugger
by TomDLux (Vicar) on Feb 01, 2011 at 21:15 UTC

    Assuming you are on a Unix platform, does it work if you specify the module at the command line?

    perl -Mautobox::Core -d yourprog

    If that works, just set up an alias in your shell '.rc' file, to save repeated typing.

    As Occam said: Entia non sunt multiplicanda praeter necessitatem.