Devel::Caller - meatier versions of caller
caller
use Devel::Caller qw(caller_cv); $foo = sub { print "huzzah\n" if $foo == caller_cv(0) }; $foo->(); # prints huzzah use Devel::Caller qw(called_with); sub foo { print called_with(0,1); } foo( my @foo ); # should print '@foo'
This module has external dependencies on the following modules:
PadWalker 0.08
perl Build.PL perl Build test
and if all goes well
perl Build install
What changed over the last 3 revisions
Fudge around the segfaults in 5.8.x ithreaded builds by not looking up what the package variable is.
Use strlen rather than playing with SvLEN/SvCUR to determine the length of identifiers in the pad. It's a theoretical segfault waiting to happen, but one that isn't tickled by the current test suite. Fixes failures under perl 5.8.8 as reported by clkao.
Split Changes out from HISTORY pod section. Port to Module::Build We can now determine constant values in called_with. Partial fixes for http://rt.cpan.org/NoAuth/Bug.html?id=2878
"caller" in perlfunc, PadWalker, Devel::Peek
Richard Clamp <richardc@unixbeard.net> with close reference to PadWalker by Robin Houston
Copyright (c) 2002, 2003, 2006 Richard Clamp. All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.
To install DB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DB
CPAN shell
perl -MCPAN -e shell install DB
For more information on module installation, please visit the detailed CPAN module installation guide.