V
Volker Nicolai
Hi,
I have tried to use aliases in the Perl debugger.
Running my script-to_debug in the Perl debugger
I included a debug module I wrote and set an alias for invoking it:
DB<10> use dump_vars;
DB<11> = dvo dump_all_vars (\%main::, "main::","");
or
DB<11> $alias{dvo} = 'dump_all_vars (\%main::, "main::","");'
But neither of these works, nor does one of these:
= dvo 'dump_all_vars (\%main::, "main::","");'
= dvo dump_all_vars(\%main::,"main::","");
= dvo "dump_all_vars (\%main::, \"main::\",\"\");"
For the '$alias =...' setting above I get this when trying to use it:
Bareword found where operator expected at (eval
64)[/cadappl/perl/5.6.1/lib/5.6.1/perl5db.pl:1521] line 2, near
""dump_all_vars (%main::, "main::"
(Missing operator before main::?)
String found where operator expected at (eval
64)[/cadappl/perl/5.6.1/lib/5.6.1/perl5db.pl:1521] line 2, near
"main::",""
String found where operator expected at (eval
64)[/cadappl/perl/5.6.1/lib/5.6.1/perl5db.pl:1521] line 2, near
"","");""
(Missing operator before ");"?)
syntax error at (eval
64)[/cadappl/perl/5.6.1/lib/5.6.1/perl5db.pl:1521] line 2, near
""dump_all_vars (%main::, "main::"
The same holds for the last "=dvo..." above
The other ones seem to cause the invokation of my sub without
arguments.
What happens here? Why don't my aliases work?
How to properly set aliases in the debugger?
Thanks for helping.
Volker
I have tried to use aliases in the Perl debugger.
Running my script-to_debug in the Perl debugger
I included a debug module I wrote and set an alias for invoking it:
DB<10> use dump_vars;
DB<11> = dvo dump_all_vars (\%main::, "main::","");
or
DB<11> $alias{dvo} = 'dump_all_vars (\%main::, "main::","");'
But neither of these works, nor does one of these:
= dvo 'dump_all_vars (\%main::, "main::","");'
= dvo dump_all_vars(\%main::,"main::","");
= dvo "dump_all_vars (\%main::, \"main::\",\"\");"
For the '$alias =...' setting above I get this when trying to use it:
Bareword found where operator expected at (eval
64)[/cadappl/perl/5.6.1/lib/5.6.1/perl5db.pl:1521] line 2, near
""dump_all_vars (%main::, "main::"
(Missing operator before main::?)
String found where operator expected at (eval
64)[/cadappl/perl/5.6.1/lib/5.6.1/perl5db.pl:1521] line 2, near
"main::",""
String found where operator expected at (eval
64)[/cadappl/perl/5.6.1/lib/5.6.1/perl5db.pl:1521] line 2, near
"","");""
(Missing operator before ");"?)
syntax error at (eval
64)[/cadappl/perl/5.6.1/lib/5.6.1/perl5db.pl:1521] line 2, near
""dump_all_vars (%main::, "main::"
The same holds for the last "=dvo..." above
The other ones seem to cause the invokation of my sub without
arguments.
What happens here? Why don't my aliases work?
How to properly set aliases in the debugger?
Thanks for helping.
Volker