breakpoint on builtin functions?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I am trying to use the Perl debugger.

My program (using MANY Cpan modules) is generating
output to screen which I do not desire.

I thought - easy; run up the debugger,
put a breakpoint on "print", let 'er go,
stacktrace, job done.


I loaded my program under the debugger, and...

DB<4> b print
Subroutine main::print not found.

Should I be qualifying the name "print"
in some way, or can breakpoints only be put on "pure" perl?

The debugger sets breakpoints on my program's own
functions perfectly well.


Re: breakpoint on builtin functions?

Quoted text here. Click to load it

If you never use indirect argument to print, override the builtin, and
set the breakpoint on the overriding Perl function.  (At least in
5.8.*, the functions using indirect argument are not easily overridable.)

Hope this helps,

Site Timeline