-
-
27 Mar 2018 01:02:58 UTC
- Distribution: Devel-Events
- Module version: 0.09
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (1)
- Testers (443 / 411 / 0)
- Kwalitee
Bus factor: 3- % Coverage
- License: perl_5
- Perl: v5.6.0
- Activity
24 month- Tools
- Download (41.2KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
NAME
Devel::Events::Generator::SubTrace - generate
executing_line
events using the perl debugger apiVERSION
version 0.09
SYNOPSIS
my $g = Devel::Events::Generator::SubTrace->new( handler => $h ); $g->enable(); # every subroutine will have two events fired, on entry and exit $g->disable();
DESCRIPTION
This Devel::Events generator will fire sub tracing events using
DB::sub
, a perl debugger hook.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.
EVENTS
- enter_sub
-
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.- name
-
The name of the subroutine (or it's
overload::StrVal
if it has none). - code
-
A code reference to the subroutine.
- args
-
A copy of the arguments list.
\@_
causes segfaults but[ @_ ]
does not. Bummer ;-) - depth
-
The current depth of the call stack.
- wantarray
-
The context of the call as given by
wantarray
- leave_sub
-
Exactly like
enter_sub
, but fired just after leaving the subroutine.All the fields of
enter_sub
are passed.Additional fields:
- ret
-
The return value of the subroutine.
METHODS
- enable
-
Enable this generator instance, disabling any other instance of Devel::Events::Generator::SubTrace.
- disable
-
Stop firing events.
- enter_sub
-
Called by
DB::sub
. Sends theenter_sub
event. - leave_sub
-
Called by
DB::sub
. Sends theleave_sub
event.
SEE ALSO
perldebguts, Devel::CallTrace, DB, Devel::ebug, perl5db.pl
SUPPORT
Bugs may be submitted through the RT bug tracker (or bug-Devel-Events@rt.cpan.org).
AUTHOR
יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org>
COPYRIGHT AND LICENCE
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.
Module Install Instructions
To install Devel::Events, copy and paste the appropriate command in to your terminal.
cpanm Devel::Events
perl -MCPAN -e shell install Devel::Events
For more information on module installation, please visit the detailed CPAN module installation guide.