view release on metacpan or search on metacpan
lib/Data/Rebuilder.pm view on Meta::CPAN
use Carp;
use Sub::Name;
use Path::Class;
use Lexical::Alias;
use B::Deparse;
use PadWalker;
use Data::Polymorph;
=head1 STATIC METHODS
lib/Data/Rebuilder.pm view on Meta::CPAN
my $target = shift || $cv;
my $var = $self->ref_to_var($target);
my $dp = ( $self->{_deparse}
||= (__PACKAGE__."::B::Deparse")->new );
my $closed = PadWalker::closed_over( $cv );
my $b = B::svref_2object($cv);
my $name = $b->GV->NAME;
my @vars = ();
foreach my $key (keys %$closed) {
lib/Data/Rebuilder.pm view on Meta::CPAN
sprintf(' my %s = undef; #cycled RefRef', $key);
my $lazy = $self->_lazy->{refaddr $$val} ||= [];
push
(@$lazy,
'require PadWalker;',
sprintf('${PadWalker::closed_over(%s)->{%s}} = %s;',
$var,
$self->freeze($key),
$self->freeze($$val))
);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Rmap.pm view on Meta::CPAN
# replace CODE with "<CODE>"
$ perl -MData::Rmap=:all -E 'say join ":", rmap_code { "<CODE>" } sub{},sub{}'
<CODE>:<CODE>
# look inside code refs with PadWalker
$ perl -MData::Rmap=:all -MSub::Identify=:all -MPadWalker=:all -MSub::Name
use 5.10.0;
my $s = sub {}; sub A::a { $s };
say join ", ",
rmap_code {
sub_fullname($_), # name string
view all matches for this distribution
view release on metacpan or search on metacpan
- No code changes.
0.7901 2007-09-01
- The memory-cycle.t test will fail if you have PadWalker and the
current Devel::Cycle (1.07) installed. I forgot I had patched my
local Devel::Cycle to fix this bug.
0.79 2007-08-30
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Debug/Client.pm view on Meta::CPAN
# sub get_y_zero
#######
sub get_y_zero {
my $self = shift;
require PadWalker if 0; #forces PadWalker to be a requires not a test_requires
# say 'running on perl '. $PERL_VERSION;
if ( $PERL_VERSION >= 5.017006 && $PERL_VERSION <= 5.021003 ) {
# say 'using y=1 instead as running on perl ' . $PERL_VERSION;
lib/Debug/Client.pm view on Meta::CPAN
y [level [vars]]
Display all (or some) lexical variables (mnemonic: my variables) in the
current scope or level scopes higher. You can limit the variables that you see
with vars which works exactly as it does for the V and X commands. Requires
that the PadWalker module be installed
Output is pretty-printed in the same style as for V and the format is
controlled by the same options.
$debugger->get_y_zero();
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Debug/Statements.pm view on Meta::CPAN
my $printdebug = "DEBUG: "; # print statement begins with this
my $id = 0; # If $d is negative, turn on $id (internal debug flag), and use the absolute value of $d. For example: $d = -1;
my $flag = '$d'; # choose another variable besides '$d'
my $disable = 0; # disable all functionality (for performance)
if ( not eval "use PadWalker; 1" ) { ## no critic
$disable = 1;
print "Did not find PadWalker so disabling Debug::Statements - d()\n";
print " Please install PadWalker from CPAN\n";
eval 'sub d {}; sub d0 {}; sub d1 {} ; sub d2 {} ; sub d3 {} ; sub D {} ; sub ls {} ; sub LS {} ; sub cp {} ; sub CP {}'; ## no critic
}
my $data_printer_installed = 0; ### Disabled because it has problems printing %opt - $dump = '21/32'
if ( not eval "use Data::Printer; 1" ) { ## no critic
$data_printer_installed = 0;
lib/Debug/Statements.pm view on Meta::CPAN
my ( $caller, $vars, $options ) = @_;
if ($id) { print "\n\n\n\n\n\n\n\n--------------- sub dx() ---------------\n" }
if ($id) { print "internaldebug: \@_ = '@_'\n" }
my $h = PadWalker::peek_my(2);
if ($id) { print "\n\ninternaldebug: Dumping \$h:\n"; Dumpvalue->new->dumpValue($h) }
# Parse options
my %opt = %globalOpt;
$opt{level} = 1;
lib/Debug/Statements.pm view on Meta::CPAN
$options = "-$options" if ! $options =~ /^-/;
return if $disable;
$peek_my_parameter = 1 if ! defined $peek_my_parameter;
$level = 1 if ! defined $level;
if ($id) { print "internaldebug ls: \$level = '$level'\n" }
my $h = PadWalker::peek_my($peek_my_parameter);
# print Dumper($h);
return if not checkLevel( $h, $level );
my $windows = ($^O =~ /Win/) ? 1 : 0;
my $command;
for my $file ( split /\s+/, $filenames ) {
lib/Debug/Statements.pm view on Meta::CPAN
my ( $filenames, $level, $peek_my_parameter ) = @_;
return if $disable;
$peek_my_parameter = 1 if ! defined $peek_my_parameter;
$level = 1 if ! defined $level;
if ($id) { print "internaldebug cp \$level = '$level'\n" }
my $h = PadWalker::peek_my($peek_my_parameter);
# print Dumper($h);
return if not checkLevel( $h, $level );
my $windows = ($^O =~ /Win/) ? 1 : 0;
my $command;
for my $file ( split /\s+/, $filenames ) {
lib/Debug/Statements.pm view on Meta::CPAN
'$var', 'T*');
=head1 REQUIREMENTS
B<L<PadWalker> must be installed>
In addition, the test suites require Test::Fatal, Test::More, and Test::Output
=head2 $d variable
lib/Debug/Statements.pm view on Meta::CPAN
=head1 GORY DETAILS
=head2 How it works
C<PadWalker::peek_my()> gets the value of $d and the contents of your variables
(from outside its scope!) The variable values are stored in an internal hash reference
It does NOT change the values of your variables.
C<caller()[3]> gets the name of subroutine which encloses your code
lib/Debug/Statements.pm view on Meta::CPAN
C<Data::Dumper> pretty-prints the contents of your variable
=head2 Performance
For performance-critical applications,
frequent calls to C<PadWalker::peek_my()> and C<caller()> may be too intensive
=head3 Solutions
=over
=item *
Globally disable all functionality by calling C<Debug::Statements::disable();>
The PadWalker and caller functions will not be called. Debug statements will not be printed.
=item *
OR comment out some of your calls to C<d()> within performance-critical loops
=item *
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Debug/Xray.pm view on Meta::CPAN
no Carp::Assert;
use Hook::LexWrap;
use Data::Dumper;
use PPI;
use PadWalker qw(var_name);
use Debug::Xray::WatchScalar qw( set_log_handler TIESCALAR STORE FETCH );
# TODO Oranize subs into EXPORT_TAGS
# CONFIGURATION
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/ArgNames.pm view on Meta::CPAN
use base qw(Exporter);
our @EXPORT_OK = our @EXPORT = qw(arg_names);
use PadWalker qw(peek_my peek_our);
sub arg_names (;$) {
my $level = shift || 2;
{ package DB; () = caller($level - 1) }
@{{ reverse %{peek_my($level)}, %{peek_our($level)} }}{\(@DB::args)};
lib/Devel/ArgNames.pm view on Meta::CPAN
commit changes.
=head1 SEE ALSO
L<Data::Dumper::Simple>, L<DB>, L<Devel::Caller>, L<Devel::Caller::Perl>,
L<PadWalker>.
=head1 AUTHORS
Ran Eilam
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/Caller.pm view on Meta::CPAN
use strict;
package Devel::Caller;
use warnings;
use B qw( peekop );
use PadWalker ();
use XSLoader;
use base qw( Exporter );
use 5.008;
our $VERSION = '2.07';
lib/Devel/Caller.pm view on Meta::CPAN
our @EXPORT_OK = qw( caller_cv caller_args caller_vars called_with called_as_method );
sub caller_cv {
my $level = shift;
my $cx = PadWalker::_upcontext($level + 1);
return unless $cx;
return _context_cv($cx);
}
our $DEBUG = 0;
lib/Devel/Caller.pm view on Meta::CPAN
*caller_vars = \&called_with;
sub called_with {
my $level = shift;
my $want_names = shift;
my $op = _context_op( PadWalker::_upcontext( $level + 1 ));
my $cv = caller_cv( $level + 2 );
my $pad = $cv ? B::svref_2object( $cv )->PADLIST : B::comppadlist;
my $padn = $pad->ARRAYelt( 0 );
my $padv = $pad->ARRAYelt( 1 );
lib/Devel/Caller.pm view on Meta::CPAN
}
sub called_as_method {
my $level = shift || 0;
my $op = _context_op( PadWalker::_upcontext( $level + 1 ));
print "called_as_method: $op\n" if $DEBUG;
die "was expecting a pushmark or pad, not a ". $op->name
unless $op->name eq "pushmark";
while (($op = $op->next) && ($op->name ne "entersub")) {
lib/Devel/Caller.pm view on Meta::CPAN
=back
=head1 SEE ALSO
L<perlfunc/caller>, L<PadWalker>, L<Devel::Peek>
=head1 AUTHOR
Richard Clamp <richardc@unixbeard.net> with close reference to
PadWalker by Robin Houston
=head1 COPYRIGHT
Copyright (c) 2002, 2003, 2006, 2007, 2008, 2010, 2013, 2023 Richard Clamp.
All Rights Reserved.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/Camelcadedb.pm view on Meta::CPAN
use 5.008;
use strict;
use warnings;
use IO::Socket::INET;
use IO::Select;
use PadWalker qw/peek_my peek_our/;
use Scalar::Util;
use Encode;
use overload;
use PerlIO;
use Hash::StoredIterator;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/Chitin.pm view on Meta::CPAN
$level is omitted, the string is run in the context of the most recent stack
frame of the debugged program. Otherwise, $level is the number of stack
frames before the most recent to evaluate the code in. Negative numbers are
treated as 0. eval_at returns a list of two items, the result and exception.
This method requires the PadWalker module.
This method is not yet implemented.
=item CLIENT->get_var_at_level($string, $level);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/Command/DBSub/DB_5_10.pm view on Meta::CPAN
};
$cmd =~ /^y(?:\s+(\d*)\s*(.*))?$/ && do {
# See if we've got the necessary support.
eval { require PadWalker; PadWalker->VERSION(0.08) }
or &warn(
$@ =~ /locate/
? "PadWalker module not found - please install\n"
: $@
)
and next CMD;
# Load up dumpvar if we don't have it. If we can, that is.
lib/Devel/Command/DBSub/DB_5_10.pm view on Meta::CPAN
# Got all the modules we need. Find them and print them.
my @vars = split( ' ', $2 || '' );
# Find the pad.
my $h = eval { PadWalker::peek_my( ( $1 || 0 ) + 1 ) };
# Oops. Can't find it.
$@ and $@ =~ s/ at .*//, &warn($@), next CMD;
# Show the desired vars with dumplex().
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/Cycle.pm view on Meta::CPAN
BEGIN {
require constant;
constant->import( HAVE_PADWALKER =>
eval {
require PadWalker;
$PadWalker::VERSION >= 1.0;
});
}
sub import {
my $self = shift;
lib/Devel/Cycle.pm view on Meta::CPAN
my $complain = shift;
my @report = @_;
unless (HAVE_PADWALKER) {
if (!$complain->{$current} && !$QUIET) {
carp "A code closure was detected in but we cannot check it unless the PadWalker module is installed";
}
return;
}
my $closed_vars = PadWalker::closed_over( $current );
foreach my $varname ( sort keys %$closed_vars ) {
my $value = $closed_vars->{$varname};
_find_cycle_dispatch($value,{%$seenit},$callback,$inc_weak_refs,$complain,
(@report,['CODE',$varname,$current => $value]));
}
lib/Devel/Cycle.pm view on Meta::CPAN
use Devel::Cycle -raw;
=head2 Code references (closures)
If the PadWalker module is installed, Devel::Cycle will also report
cycles in code closures. If PadWalker is not installed and
Devel::Cycle detects a CODE reference in one of the data structures,
it will warn (once per data structure) that it cannot inspect the CODE
unless PadWalker is available. You can turn this warning off by
passing -quiet to Devel::Cycle at compile time:
use Devel::Cycle -quiet;
=head1 SEE ALSO
view all matches for this distribution
view release on metacpan or search on metacpan
DB/DbgrContext.pm view on Meta::CPAN
our @ISA = qw(Exporter);
our @EXPORT = qw(
emitContextNames
emitContextProperties
getContextProperties
getProximityVarsViaPadWalker
hasPadWalker
GlobalVars
LocalVars
FunctionArguments
PunctuationVariables
);
DB/DbgrContext.pm view on Meta::CPAN
} elsif ($sigil eq '%') {
return B::svref_2object($vref)->RITER != -1;
}
}
sub getProximityVarsViaPadWalker($$$$) {
my ($pkg, $filename, $line, $stackDepth) = @_;
$stackDepth += 2; # Because we're two levels above the user code here.
my $my_var_hash = PadWalker::peek_my($stackDepth);
my $our_var_hash = PadWalker::peek_our($stackDepth);
my %merged_vars = (%$my_var_hash, %$our_var_hash);
our @dbline;
local *dbline = $main::{'_<' . $filename};
my $sourceText = join("\n", @dbline);
DB/DbgrContext.pm view on Meta::CPAN
package DB;
sub getProximityVarsViaB($$$$) {
package DB::DbgrContext;
my ($pkg, $filename, $line, $stackDepth) = @_;
# there is no accurate way of getting these without PadWalker, and
# there is not way to get the values without PadWalker anyway
return [] if $stackDepth != 0;
require B;
undef *lex_var_hook;
my $b_cv = eval "sub DB::lex_var_hook {};
B::svref_2object(\\&DB::lex_var_hook)->OUTSIDE->OUTSIDE";
DB/DbgrContext.pm view on Meta::CPAN
}
}
# -1: unknown, 0: no, 1:yes #### Do not init as 1, only -1 or 0.
# bug 93570 - allow padwalker detection/use to be disabled
my $havePadWalker = $ENV{DBGP_PERL_IGNORE_PADWALKER} ? 0 : -1;
sub hasPadWalker {
if ($havePadWalker == -1) {
local $@;
eval {
require PadWalker;
PadWalker->VERSION(0.08);
$havePadWalker = 1;
};
if ($@) {
$havePadWalker = 0;
}
}
return $havePadWalker;
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
bin/dclient.pl view on Meta::CPAN
__END__
# Devel::Caller - like 'caller'
# PadWalker <- debug statements
# Package::Stash - shows package variables
# View op tree: B::Concise
# B::Deparse - deparse CODEREF
# $deparse = B::Deparse->new("-p", "-sC");
# print $deparse->coderef2text( \&DB::process );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/DumpSizes.pm view on Meta::CPAN
use strict;
use warnings;
package Devel::DumpSizes;
use PadWalker;
use Devel::Size;
use Devel::Symdump;
require Exporter;
our @ISA = qw(Exporter);
lib/Devel/DumpSizes.pm view on Meta::CPAN
our $VERSION = "0.01";
sub dump_sizes {
my $dump_file_prefix = shift || "";
my $ref_of_mys = PadWalker::peek_my(1);
my %var_sizes;
my @sorted_vars;
if ( $dump_file_prefix ) {
open(DUMP, ">>$dump_file_prefix.my") or warn "Unable to open file to dump sizes\n";
lib/Devel/DumpSizes.pm view on Meta::CPAN
=head1 DESCRIPTION
This module allows us to print the names and sizes of variables that are available at a give point in a script.
This module was written while debugging a huge long running script. The main use being to understand how variable sizes were fluctuating
during script execution. It uses PadWalker and Devel::Symdump to get the variables. It uses Devel::Size to report the size of each variable.
=head1 METHODS
=head2 dump_sizes
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/DumpTrace.pm view on Meta::CPAN
package Devel::DumpTrace;
## no critic (NoStrict,StringyEval)
use 5.008000;
use Hash::SafeKeys;
use PadWalker;
use Scalar::Util 1.14;
use Text::Shorten;
use Devel::DumpTrace::CachedDisplayedArray;
use Devel::DumpTrace::CachedDisplayedHash;
use IO::Handle;
lib/Devel/DumpTrace.pm view on Meta::CPAN
current_depth(), " $target_depth $n at ";
return;
}
eval {
$PAD_MY = PadWalker::peek_my($n + 1);
$PAD_OUR = PadWalker::peek_our($n + 1);
1;
} or do {
Carp::confess("$@ from PadWalker: \$n=$n is too large.\n",
"Target depth was $target_depth\n");
};
# add extra data to the pads so that they can be refreshed
# at an arbitrary point in the future
lib/Devel/DumpTrace.pm view on Meta::CPAN
All output from this module is for diagnostics.
=head1 DEPENDENCIES
L<PadWalker|PadWalker> for arbitrary access to lexical variables.
L<Scalar::Util|Scalar::Util> for the reference identification
convenience methods.
=head1 BUGS AND LIMITATIONS
lib/Devel/DumpTrace.pm view on Meta::CPAN
=head1 SEE ALSO
L<dumpvar.pl|perl5db.pl>, as used by the Perl debugger.
L<Devel::Trace|Devel::Trace>, L<PadWalker|PadWalker>.
L<Devel::DumpTrace::PPI|Devel::DumpTrace::PPI> is part of this
distribution and provides similar functionality using L<PPI|PPI>
to parse the source code.
view all matches for this distribution
view release on metacpan or search on metacpan
my $_quotables = [ '@', '#', '%', '^', '&', '*', ':', '"', "'", '', '', '' ];
BEGIN
{
eval "use PadWalker qw(peek_my peek_our);\n";
eval "use Devel::LexAlias qw(lexalias);\n";
($_brackets , $_simple_parens) = ___brackets_parens();
# eval "use Regex::Token qw(\$_brackets \$_simple_parens);\n";
# if ($@) { print STDERR "HERE :$@:\n"; }
#
# print STDERR "HERE: $_brackets\n";
# die;
if (!defined(&peek_my)) { print STDERR "SYSTEM WARNING: PadWalker not found!\n"; }
if (!defined(&lexalias)) { print STDERR "SYSTEM WARNING: Devel::LexAlias not found!\n"; }
# print STDERR ":$_simple_parens:\n";
*lexalias = sub { {} } if (!defined(&lexalias));
*peek_my = sub { {} } if (!defined(&peek_my));
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/EvalContext.pm view on Meta::CPAN
{ package main; sub Devel::EvalContext::_hygenic_eval { eval $_[0] } }
use strict;
use warnings;
use PadWalker qw(peek_sub);
use Carp;
use Data::Alias qw(alias);
use B ();
our $VERSION = "0.09";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/Gladiator.pm view on Meta::CPAN
Formats a string table based on C<arena_ref_counts> suitable for printing.
=head1 LIMITATIONS
This code may not work on perls 5.6.x and 5.8.x if L<PadWalker> is installed.
(Patches gratefully accepted!)
=head1 SEE ALSO
=over 4
view all matches for this distribution
view release on metacpan or search on metacpan
LexAlias.pm view on Meta::CPAN
The behaviour of this is untested, I imagine badness is very close on
the horizon though.
=head1 SEE ALSO
peek_sub from L<PadWalker>, L<Devel::Peek>
=head1 AUTHOR
Richard Clamp E<lt>richardc@unixbeard.netE<gt> with close reference to
PadWalker by Robin Houston
=head1 COPYRIGHT
Copyright (c) 2002, 2013, Richard Clamp. All Rights Reserved. This module
is free software. It may be used, redistributed and/or modified under
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/Optic.pm view on Meta::CPAN
use Scalar::Util qw(looks_like_number);
use Ref::Util qw(is_ref is_arrayref is_hashref is_scalarref is_coderef is_regexpref);
use Sub::Info qw(sub_info);
use PadWalker qw(peek_my);
use Devel::Optic::Lens::Perlish;
use constant {
DEFAULT_SCALAR_TRUNCATION_SIZE => 256,
lib/Devel/Optic.pm view on Meta::CPAN
$subject = $$subject if is_scalarref($subject);
my $scalar_truncation_size = $self->{scalar_truncation_size};
my $len = length $subject;
# simple scalars we can truncate (PadWalker always returns refs, so
# this is pretty safe from accidentally substr-ing an array or hash).
# Also, once we know we're dealing with a gigantic string (or
# number...), we can trim much more aggressively without hurting user
# understanding too much.
lib/Devel/Optic.pm view on Meta::CPAN
=over 4
=item *
L<PadWalker>
=item *
L<Devel::Probe>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/Probe.pm view on Meta::CPAN
=back
=head1 EXAMPLE
This will invoke the callback defined with the call to C<trigger()>, the first
time line 21 executes, taking advantage of C<PadWalker> to dump the local
variables. After that first execution, that particular probe will not be
triggered anymore. For line 22, every time that line is executed the probe
will be triggered.
# line 1
use 5.18.0;
use Data::Dumper qw(Dumper);
use PadWalker qw(peek_my);
use Devel::Probe;
Devel::Probe::trigger(sub {
my ($file, $line) = @_;
say Dumper(peek_my(1)); # 1 to jump up one level in the stack;
lib/Devel/Probe.pm view on Meta::CPAN
As another example, you can pass a custom argument to the trigger callback:
# line 1
use 5.18.0;
use PadWalker qw(peek_my);
use Devel::Probe;
Devel::Probe::trigger(sub {
my ($file, $line, $interesting_var_name) = @_;
say "$interesting_var_name: " . ${ peek_my(1)->{$interesting_var_name} };
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/REPL/Plugin/InProcess.pm view on Meta::CPAN
package Devel::REPL::Plugin::InProcess;
use Devel::REPL::Plugin;
use PadWalker ();
use namespace::clean -except => [ 'meta' ];
has '_caller_depth' => (
isa => 'Int',
is => 'rw',
lib/Devel/REPL/Plugin/InProcess.pm view on Meta::CPAN
caller $found_level;
# (+ 1) because caller(0) is the caller package while peek_my(0) are
# the lexicals in the current scope, (- $found_evals) because peek_my
# skips eval frames but caller counts them
my $my = PadWalker::peek_my($found_level + 1 - $found_eval);
my $our = PadWalker::peek_our($found_level + 1 - $found_eval);
my $lexenv = $self->lexical_environment;
my $cxt;
for my $key (keys %$my) {
if ($key =~ /^\$/) {
view all matches for this distribution
view release on metacpan or search on metacpan
# Author: Paul Barry, paul.barry@itcarlow.ie
# Create: October 2002.
# Update: April/May 2003 - Version 4.x series.
#
# Notes: This code takes advantage of the CPAN modules
# PadWalker and Storable (with a little help from the
# Data::Dumper module when it comes to Objects). The Crypt::RSA
# module provides PK+/PK- support.
#
# Version 1.x supported relocating simple Perl code.
# Version 2.x supported relocating SCALARs, ARRAYs, and
if ( $sub =~ /^Mobile::Executive::relocate$/ )
{
use Socket; # Functional interface to Socket API.
use Storable qw( freeze thaw ); # Provides a persistence mechanism.
use PadWalker qw( peek_my ); # Provides access to all lexically scoped variables.
use Crypt::RSA; # Provides authentication and
# encryption services.
my $remote = shift;
It would also be nice to incorporate an updated B<Class::Tom> (by James Duncan) to handle the relocation of objects to a Location without the need to have the module exist on the remote Location. On my system (Linux), the most recent B<Class::Tom> g...
=head1 SEE ALSO
The B<Mobile::Executive> module and the B<Mobile::Location> class. Internally, this module uses the following CPAN modules: B<PadWalker> and B<Storable>, in addition to the standard B<Data::Dumper> module. The B<Crypt::RSA> modules provides encrypt...
The Scooby Website: B<http://glasnost.itcarlow.ie/~scooby/>.
=head1 AUTHOR
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/StackTrace/WithLexicals.pm view on Meta::CPAN
use 5.008001;
use base 'Devel::StackTrace';
use Devel::StackTrace::WithLexicals::Frame;
use PadWalker 'peek_my';
our $VERSION = '2.01';
# mostly copied from Devel::StackTrace 2.00
sub _record_caller_data {
lib/Devel/StackTrace/WithLexicals.pm view on Meta::CPAN
my $filter = $self->{filter_frames_early} && $self->_make_frame_filter();
# We exclude this method by starting at least one frame back.
my $x = 1 + ( $self->{skip_frames} || 0 );
# PadWalker ignores eval block and eval string, so we have to keep
# a different frame count for it
my $walker = 0;
for my $caller_count (0..$x) {
my $sub = (caller($caller_count))[3];
++$walker unless $sub eq '(eval)';
lib/Devel/StackTrace/WithLexicals.pm view on Meta::CPAN
__END__
=head1 NAME
Devel::StackTrace::WithLexicals - Devel::StackTrace + PadWalker
=head1 SYNOPSIS
use Devel::StackTrace::WithLexicals;
lib/Devel/StackTrace/WithLexicals.pm view on Meta::CPAN
=head1 DESCRIPTION
L<Devel::StackTrace> is pretty good at generating stack traces.
L<PadWalker> is pretty good at the inspection and modification of your callers'
lexical variables.
L<Devel::StackTrace::WithLexicals> is pretty good at generating stack traces
with all your callers' lexical variables.
=head1 METHODS
All the same as L<Devel::StackTrace>, except that frames (in class
L<Devel::StackTrace::WithLexicals::Frame>) also have a C<lexicals> method. This
returns the same hashref as returned by L<PadWalker>.
Unless the C<unsafe_ref_capture> option to L<Devel::StackTrace> is
used, then each reference is stringified. This can be useful to avoid
leaking memory.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/Symdump.pm view on Meta::CPAN
Devel::Symdump package and turns them into functions.
=head1 SEE ALSO
Routines for manipulating stashes: C<Package::Stash>; to work with
lexicals: C<PadWalker>.
=head1 AUTHORS
Andreas Koenig F<< <andk@cpan.org> >> and Tom Christiansen
F<< <tchrist@perl.com> >>. Based on the old F<dumpvar.pl> by Larry
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/TraceVars.pm view on Meta::CPAN
package Devel::TraceVars;
use strict;
use Data::Dumper;
use PadWalker qw(peek_my);
use Config;
##
# Variables
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/Trepan/CmdProcessor/Command/Info_Subcmd/Variables_Subcmd/Lexicals.pm view on Meta::CPAN
package Devel::Trepan::CmdProcessor::Command::Info::Variables::Lexicals;
our (@ISA, @SUBCMD_VARS);
use Devel::Trepan::CmdProcessor::Command::Subcmd::Subsubcmd;
use PadWalker qw(peek_my peek_our);
use Devel::Trepan::CmdProcessor::Command::Info_Subcmd::Variables_Subcmd::My;
our $CMD = "info variables lexicals";
my @CMD = split(/ /, $CMD);
use constant MAX_ARGS => undef;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/ebug/Backend/Plugin/Pad.pm view on Meta::CPAN
package Devel::ebug::Backend::Plugin::Pad;
use strict;
use warnings;
use PadWalker;
our $VERSION = '0.64'; # VERSION
sub register_commands {
return ( pad => { sub => \&DB::pad } )
lib/Devel/ebug/Backend/Plugin/Pad.pm view on Meta::CPAN
use Scalar::Util qw(blessed reftype);
sub pad {
my($req, $context) = @_;
my $pad;
my $h = eval { PadWalker::peek_my(2) };
foreach my $k (sort keys %$h) {
if ($k =~ /^@/) {
my @v = eval "package $context->{package}; ($k)"; ## no critic (BuiltinFunctions::ProhibitStringyEval)
$pad->{$k} = \@v;
} else {
view all matches for this distribution