Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: perldb: Howto trace only "my" modules?

by Kanji (Parson)
on Jan 29, 2012 at 19:43 UTC ( #950635=note: print w/replies, xml ) Need Help??

in reply to perldb: Howto trace only "my" modules?

There's a The Effective Perler article on custom tracing entitled Trace your Perl programs that you might find useful, particularly the last example.

To summarize...

  • Under the -d switch, perl calls &DB::DB before each statement
  • You can write your own tracer (e.g., Devel::Foo) to define your own &DB::DB that excludes third-party modules, and run it via -d:Foo
  • .
  • Comment on Re: perldb: Howto trace only "my" modules?

Replies are listed 'Best First'.
Re^2: perldb: Howto trace only "my" modules?
by The Perlman (Scribe) on Jan 29, 2012 at 20:19 UTC
    Thanks for the links.

    I was aware that I can overload internal DB:: functions, (sorry for not mentioning)

    I just had the hope that I could solve this with an *option* (CLI or .perldb).

    Actually in this case I think I have to overload DB::sub like demonstrated in perldebguts

    { package DB; sub DB {} sub sub {print ++$i, " $sub\n"; &$sub} }
    Thanks anyway! :)

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://950635]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (1)
As of 2021-10-17 13:37 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (71 votes). Check out past polls.