Devel::Events::Generator::SubTrace - generate executing_line events using the perl debugger api
executing_line
version 0.09
my $g = Devel::Events::Generator::SubTrace->new( handler => $h ); $g->enable(); # every subroutine will have two events fired, on entry and exit $g->disable();
This Devel::Events generator will fire sub tracing events using DB::sub, a perl debugger hook.
DB::sub
Only one instance may be enabled at a given time. Use Devel::Events::Handler::Multiplex to deliver events to multiple handlers.
Subroutines inside the Devel::Events namespace or it's children will be skipped.
When the generator is enabled, this event will fire for every subroutine, just before it is executed.
Subroutines in a package starting with Devel::Events:: will not be reported.
Devel::Events::
The name of the subroutine (or it's overload::StrVal if it has none).
overload::StrVal
A code reference to the subroutine.
A copy of the arguments list. \@_ causes segfaults but [ @_ ] does not. Bummer ;-)
\@_
[ @_ ]
The current depth of the call stack.
The context of the call as given by wantarray
wantarray
Exactly like enter_sub, but fired just after leaving the subroutine.
enter_sub
All the fields of enter_sub are passed.
Additional fields:
The return value of the subroutine.
Enable this generator instance, disabling any other instance of Devel::Events::Generator::SubTrace.
Stop firing events.
Called by DB::sub. Sends the enter_sub event.
Called by DB::sub. Sends the leave_sub event.
leave_sub
perldebguts, Devel::CallTrace, DB, Devel::ebug, perl5db.pl
Bugs may be submitted through the RT bug tracker (or bug-Devel-Events@rt.cpan.org).
יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org>
This software is copyright (c) 2007 by יובל קוג'מן (Yuval Kogman).
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Devel::Events, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Devel::Events
CPAN shell
perl -MCPAN -e shell install Devel::Events
For more information on module installation, please visit the detailed CPAN module installation guide.