Devel::Spy::Util - Utility functions for Devel::Spy
FUNCTION = Devel::Spy::Util->Y( FUNCTION )
The Y combinator. See http://use.perl.org/~Aristotle/journal/30896 for the scoop. Devel::Spy uses it to make functions that support the following snippet.
while ( ... ) { $logger = $logger->(); }
VALUE = Devel::Spy::Util->compile_this( SOURCE CODE )
Compiles SOURCE CODE and returns it. It throws an exception if the result is false.
LOCATION = Devel::Spy::Util->comes_from
Returns a string showing the file and line number that called into Devel::Spy.
WRAPPED OBJECT = Devel::Spy::Util->wrap_thing( OBJECT, CODE )
WRAPPED OBJECT = Devel::Spy::Util->wrap_thing( REFERENCE, CODE )
VALUE = Devel::Spy::Util->wrap_thing( VALUE, CODE )
If the "thing" passed in as the first parameter is any kind of reference or object it is returned in a Devel::Spy::Tie* wrapper.
This is how Devel::Spy tracks accesses to hashes and other references.
Devel::Spy, Devel::Spy::_obj, Devel::Spy::TieHash, Devel::Spy::TieArray, Devel::Spy::TieScalar, Devel::Spy::TieHandle
To install Devel::Spy, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Devel::Spy
CPAN shell
perl -MCPAN -e shell install Devel::Spy
For more information on module installation, please visit the detailed CPAN module installation guide.