I like this one thanks :-)

I'd suggest one little addition:

Line 16: verbose => $arg{verbose} ? '' : "\n", ++ params => $arg{params} ? 1 : 0, Line 31: -- my( $direction, $pkg, $sym ) = @_; ++ my( $direction, $pkg, $sym , $start) = @_; Line 37: -- $pkg, $sym, $self->{verbose}, ++ $pkg, $sym, ++ ( $start && $self->{params} ? "( '".join( "', '", @_[0..$#_-1] +)."')" : ()), ++ $self->{verbose}, Line 85: -- pre => $self->_gen_wrapper( $self->{pre}, $pkg, $sym, ), -- post => $self->_gen_wrapper( $self->{post}, $pkg, $sym, ); ++ pre => $self->_gen_wrapper( $self->{pre}, $pkg, $sym, 1 ), ++ post => $self->_gen_wrapper( $self->{post}, $pkg, $sym, 0 +);
to allow printing the parameters to the procedure.

The code doesn't print data structures, if some of the parameters is a reference you'll see just SCALAR(xxxx), but I do not think that much info is needed. If you think otherwise you could use Data::Dumper to print them out:

Line 5: use Hook::LexWrap; ++ use Data::Dumper; Line 31: return sub{ ++ local $Data::Dumper::Indent = 0; ++ local $Data::Dumper::Terse = 1; Line 37: -- $pkg, $sym, $self->{verbose}, ++ $pkg, $sym, ++ ( $start && $self->{params} ? '( '.join( ", ", Dumper(@_[0..$# +_-1])).")" : ()), ++ $self->{verbose},

  Jenda

== Jenda@Krynicky.cz == http://Jenda.Krynicky.cz ==
Always code as if the guy who ends up maintaining your code
will be a violent psychopath who knows where you live.
      -- Rick Osborne, osborne@gateway.grumman.com

In reply to Re: Devel::TrackSub - Subroutine wrappers for debugging by Jenda
in thread Devel::TrackSub - Subroutine wrappers for debugging by particle

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.