Devel-Agent
view release on metacpan or search on metacpan
lib/Devel/Agent.pm view on Meta::CPAN
}
},
);
=item * last_depth=>Int
This value is used at runtime to determine the previous point in the stack trace.
=cut
has last_depth=>(
default=>0,
lazy=>1,
is=>'rw',
clearer=>1,
# isa=>Int,
);
=item * depths=>ArrayRef
This is used at runtime to determin the current frame stack depth. Each currently executing frame is kept in order from top to the bottom of the stack.
=cut
has depths=>(
is=>'rw',
lazy=>1,
# isa=>ArrayRef,
clearer=>1,
default=>sub { return [] },
);
=item * order_id=>Int
This option acts as the sequence or order of execution counter for frames. When a frame starts $self->order_id is incremented by 1 and set to the frame's oder_id when the frame has completed execution the current $self->order_id is incremented again...
=cut
has order_id=>(
# isa=>Int,
is=>'rw',
lazy=>1,
default=>0,
clearer=>1,
);
=item * save_to_stack=>Bool
This option is used to turn on or of the saving of frames details in to a layered structure inside of $self->trace. The default is 0 or false.
=cut
has save_to_stack=>(
# isa=>Bool,
is=>'rw',
default=>0,
);
=item * on_frame_end=>CodeRef
This code ref is called when a frame is closed. This should act as the default data streaming hook callback. All tracing operations are halted durriong this callback.
Example:
sub {
my ($self,$last)=@_;
# $self: An instance of DB
# $last: The most currently closed frame
}
=cut
has on_frame_end=>(
# isa=>CodeRef,
is=>'rw',
default=>sub { sub {} },
);
=item * trace_id=>Int
This method provides the current agent tracing pass. This number is incremented at the start of each call to $self->start_trace.
=cut
has trace_id=>(
is=>'rw',
default=>0,
lazy=>1,
);
=item * ignore_blocks=>HasRef[Int]
This hashref reprents what perl phazed blocks to ignore, the defaults are.
{
BEGIN=>1,
END=>1,
INIT=>1,
CHECK=>1,
UNITCHECK=>1,
}
The default values used to generate the hashref contained in in @DB::@PHAZES
=cut
our @PHAZES=(qw(BEGIN END INIT CHECK UNITCHECK));
has ignore_blocks=>(
#isa=>HashRef[Int],
is=>'ro',
default=>sub {
return { map { ($_,1) } @PHAZES}
},
);
=item * constructor_methods=>HashRef[Int]
This is a hash of method names we consider object constructors
( run in 0.928 second using v1.01-cache-2.11-cpan-5511b514fd6 )