Devel::Spy

Spy on your objects and data
Download

Devel::Spy Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Joshua ben Jore
  • Publisher web site:
  • http://search.cpan.org/~jjore/

Devel::Spy Tags


Devel::Spy Description

Spy on your objects and data Devel::Spy is a Perl 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.SYNOPSIS # Create an event log and function to write to it. use Devel::Spy; my ( $log, $logger ) = Devel::Spy->make_eventlog(); # Wrap an object and let a black box do something to it. my $obj = Some::Thing->new; my $wrapped = Devel::Spy->new( $obj, $logger ); black_box_function( $obj ); # Look at what happened. for my $event ( @$log ) { print "$event "; } Requirements: · Perl


Devel::Spy Related Software