Devel-Spy
view release on metacpan or search on metacpan
lib/Devel/Spy.pm view on Meta::CPAN
1;
__END__
=head1 NAME
Devel::Spy - Spy on your objects and data
=head1 DESCRIPTION
Devel::Spy is a transparent wrapper over your objects and data. All
accesses are logged. This is useful for instrumenting "black box"
code. You can just look at see what the code used and how it used it.
I used it to find out what attributes and values were being used as
booleans and then wrote tests that fed the "black box" code with
inputs covering all possible combinations. By using Devel::Spy I
didn't have to be an expert in the code I was looking at knew I wasn't
going to overlook any parameters.
=head1 SYNOPSIS
lib/Devel/Spy.pm view on Meta::CPAN
for my $event ( @$log ) {
print "$event\n";
}
=head1 CLASS METHODS
=over
=item C<< WRAPPED THING = Devel::Spy->new( THING, LOGGING FUNCTION ) >>
Wraps a thing in a transparent proxy object. This is how you
instrument your things.
=item C<< ( ARRAY REF, LOGGING FUNCTION ) = Devel::Spy->make_eventlog >>
Returns an array reference and a logging function. Pass the logging
function into any C<Devel::Spy> object you wish to have use the same
event log.
This is how you can make a shared event log that associates all
actions with their sources.
( run in 0.423 second using v1.01-cache-2.11-cpan-0a6323c29d9 )