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
view release on metacpan or search on metacpan
lib/Devel/hdb/App/Eval.pm view on Meta::CPAN
my $value = eval { $app->get_var_at_level($varname, $level) };
my $exception = $@;
if ($exception) {
if ($exception =~ m/Can't locate PadWalker/) {
return [ 501,
[ 'Content-Type' => 'text/html'],
[ 'Not implemented - PadWalker module is not available'] ];
} elsif ($exception =~ m/Not nested deeply enough/) {
return [ 404,
[ 'Content-Type' => 'text/html' ],
[ 'Stack level not found' ] ];
view all matches for this distribution
view release on metacpan or search on metacpan
0.013 2015-05-30 19:16:03Z
- require a new enough Module::CoreList in tests to ensure is_core()
is available
0.012 2015-05-25 00:47:09Z
- fix test failure with PadWalker on older perls
0.011 2015-05-23 18:27:08Z
- warn whenever can_xs, can_cc, or can_run is used, until
implementation concerns are resolved
- add new sub has_module, as an alternative to can_use that does
view all matches for this distribution
view release on metacpan or search on metacpan
"warnings" => 0
},
"test_requires" => {
"File::Spec" => 0,
"Module::Metadata" => 0,
"PadWalker" => 0,
"Path::Tiny" => 0,
"Test::DZil" => 0,
"Test::Deep" => 0,
"Test::Fatal" => 0,
"Test::More" => "0.88",
my %fallback_build_requires = (
"File::Spec" => 0,
"Module::Metadata" => 0,
"PadWalker" => 0,
"Path::Tiny" => 0,
"Test::DZil" => 0,
"Test::Deep" => 0,
"Test::Fatal" => 0,
"Test::More" => "0.88",
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Pod/Weaver/PluginBundle/ATOOMIC.pm view on Meta::CPAN
use namespace::autoclean -also => ['_exp'];
use Dist::Zilla::Plugin::PodWeaver;
use List::Util qw( first );
use Module::Runtime qw( use_module );
use PadWalker qw( peek_sub );
use Pod::Elemental::Transformer::List;
use Pod::Elemental::Transformer::Verbatim;
use Pod::Weaver::Config::Assembler;
use Pod::Weaver::Plugin::SingleEncoding;
use Pod::Weaver::Plugin::Transformer;
view all matches for this distribution
view release on metacpan or search on metacpan
test_deps = 0
;;; These are new modules that differ from the previous version since we are bootstrapping and need them prior to using the bundle.
;;; (needed for Travis CI testing)
; authordep Dist::Zilla::Plugin::ChangelogFromGit::CPAN::Changes
; authordep PadWalker
; Prereqs
[AutoPrereqs]
[MinimumPerl]
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Pod/Weaver/PluginBundle/Author/ETHER.pm view on Meta::CPAN
no if "$]" >= 5.041009, feature => 'smartmatch';
no feature 'switch';
use namespace::autoclean -also => ['_exp'];
use Pod::Weaver::Config::Assembler;
use Module::Runtime 'use_module';
use PadWalker 'peek_sub';
sub _exp { Pod::Weaver::Config::Assembler->expand_package($_[0]) }
# This sub behaves somewhat like a Dist::Zilla pluginbundle's configure() -- it returns a list of strings or 1, 2
# or 3-element arrayrefs containing plugin specifications. The goal is to make this look as close to what
view all matches for this distribution
view release on metacpan or search on metacpan
Notes/cpan-namespaces/cpan-namespaces-L1-L2.txt view on Meta::CPAN
PackageManager::Virtual
Packed
Packed::Array
Pad
Pad::Tie
PadWalker
Padre
Padre::Autosave
Padre::Breakpoints
Padre::Browser
Padre::CPAN
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Pod/Weaver/PluginBundle/DROLSKY.pm view on Meta::CPAN
our $VERSION = '1.24';
use Dist::Zilla::Plugin::PodWeaver;
use List::Util qw( first );
use Module::Runtime qw( use_module );
use PadWalker qw( peek_sub );
use Pod::Elemental::Transformer::List;
use Pod::Elemental::Transformer::Verbatim;
use Pod::Weaver::Config::Assembler;
use Pod::Weaver::Plugin::SingleEncoding;
use Pod::Weaver::Plugin::Transformer;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Pod/Weaver/PluginBundle/MAXMIND.pm view on Meta::CPAN
use namespace::autoclean -also => ['_exp'];
use Dist::Zilla::Plugin::PodWeaver;
use Module::Runtime qw( use_module );
use PadWalker qw( peek_sub );
use Pod::Elemental::Transformer::List;
use Pod::Elemental::Transformer::Verbatim;
use Pod::Weaver::Config::Assembler;
use Pod::Weaver::Plugin::SingleEncoding;
use Pod::Weaver::Plugin::Transformer;
view all matches for this distribution
view release on metacpan or search on metacpan
1.03 Jan 15, 2008
- Got source handling to work
- Added some real tests
1.03_01 Jan 20, 2008
- 20expect.t doesn't require PadWalker anymore
- .perldb is chmod 0644 to defeat perl5db.pl
- Black magic DB::proceed_at
- Not released yet
1.06 Feb 24, 2008
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Eponymous/Hash.pm view on Meta::CPAN
package Eponymous::Hash;
use PadWalker 'var_name';
use Scalar::Util 'blessed';
our $VERSION = '0.02';
sub import {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Error/Base.pm view on Meta::CPAN
# See also : ____
#
# I hope this is the worst possible implementation of late().
# Late interpolation is accomplished by multiple immediate interpolations,
# inside and outside of a string eval.
# Non-core PadWalker is not used to derive interpolation context;
# caller is required to pass context inside the $self object.
# To avoid collision and unintended interpolation, I make housekeeping
# variables internal to this routine, package variables.
# These are fully qualified to a "foreign" package; caller cannot
# accidentally access them (although I cannot stop you from doing stupid).
view all matches for this distribution
view release on metacpan or search on metacpan
t/close-over.t view on Meta::CPAN
use Test::Fatal;
use B;
use Eval::Closure;
use Test::Requires 'PadWalker';
{
my $foo = [];
my $env = { '$foo' => \$foo };
my $code = eval_closure(
source => 'sub { push @$foo, @_ }',
environment => $env,
);
is_deeply(scalar(PadWalker::closed_over($code)), $env,
"closed over the right things");
}
{
my $foo = {};
t/close-over.t view on Meta::CPAN
my $code = eval_closure(
source => 'sub { push @$foo, @_; $bar->{foo} = \@_ }',
environment => $env,
);
is_deeply(scalar(PadWalker::closed_over($code)), $env,
"closed over the right things");
}
{
# i feel dirty
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Eval/Compile.pm view on Meta::CPAN
None by default.
=head1 SEE ALSO
L<PadWalker>, L<perlapi>, L<perlfunc>
=head1 AUTHOR
A. G. Grishayev, E<lt>grian@cpan.org<gt>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Eval/Quosure.pm view on Meta::CPAN
use warnings;
our $VERSION = '0.001002'; # VERSION
use List::Util 1.28 qw(pairmap);
use PadWalker 2.3 qw(peek_my peek_our);
use Safe::Isa 1.000009;
use Sub::Quote 2.005 qw(quote_sub);
use Type::Params 1.004004;
use Types::Standard qw(Str Int HashRef Optional);
lib/Eval/Quosure.pm view on Meta::CPAN
=head1 CONSTRUCTION
new(Str $expr, $level=0)
C<$expr> is a string. C<$level> is used like the argument of C<caller> and
PadWalker's C<peek_my>, C<0> is for the scope that creates the quosure
object, C<1> is for the upper scope of the scope that creates the quosure,
and so on.
=head1 METHODS
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Eve/Support.pm view on Meta::CPAN
use strict;
use warnings;
use Contextual::Return;
use PadWalker ();
use Tie::IxHash;
use Eve::Exception;
=head1 NAME
lib/Eve/Support.pm view on Meta::CPAN
sub arguments : lvalue {
my $arg_hash = shift;
foreach my $var (@_) {
my $name = PadWalker::var_name(1, \$var);
if (not defined($name)) {
Eve::Error::Attribute->throw(
message => 'Could not get a variable for a named argument');
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Export/Attrs.pm view on Meta::CPAN
use warnings;
use strict;
use Carp;
use Attribute::Handlers;
use PadWalker qw( var_name peek_my );
my %IMPORT_for;
sub import {
my $caller = caller;
view all matches for this distribution
view release on metacpan or search on metacpan
1.00 Sat Aug 31 18:38:27 CEST 2002
- TOTAL rewrite. Now that perl 5.8.0 is out, we have attributes
on 'our' variables. This means we don't have to clumsily export
globals, nor do we need to export lexicals (which was a weird
concept anyway). So there's no need for Filter::Simple and
PadWalker or any of the ugly workarounds that introduced. And
once it occurred to me that Exporter::Simple could just subclass
Exporter, and modules wanting to use Exporter::Simple could
subclass it, things were a lot easier. Now using the attributes
will populate the exporting package's @EXPORT, @EXPORT_OK
and %EXPORT_TAGS direcltly, and we let Exporter have its way
view all matches for this distribution
view release on metacpan or search on metacpan
"Jcode" : "0",
"List::MoreUtils" : "0.413",
"List::Util" : "0",
"Log::Log4perl" : "1.46",
"OLE::Storage_Lite" : "0.19",
"PadWalker" : "2.1",
"Params::Validate" : "0",
"Parse::RecDescent" : "0",
"Plack" : "1.0039",
"Scalar::Util" : "0",
"Set::Scalar" : "1.29",
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Chj/Serialize.pm view on Meta::CPAN
{
package Chj::Serialize::Closure;
use PadWalker qw(closed_over set_closed_over);
use FP::Repl::WithRepl qw(WithRepl_eval);
use B::Deparse;
use FP::Predicates ":all";
our $deparse = B::Deparse->new("-p", "-l", "-q");
view all matches for this distribution
view release on metacpan or search on metacpan
corpus/distmap.json view on Meta::CPAN
"versions_gentoo" : [
"0.250.0"
]
}
],
"PadWalker" : [
{
"category" : "dev-perl",
"package" : "PadWalker",
"repository" : "gentoo",
"versions_gentoo" : [
"1.920.0",
"1.930.0",
"1.940.0"
view all matches for this distribution
view release on metacpan or search on metacpan
0.40016 Mon Oct 15, 2012
Fix bug with DBIC model interface
0.40015 Sun Oct 14, 2012
Remove extraneous use of Data::Printer
Correct spelling of PadWalker
0.40014 Sat Oct 13, 2012
Add useful message and die in field widgets with no result
Use string instead of object in LANGUAGE_HANDLE
Fix bug in required_when when value is 0
view all matches for this distribution
view release on metacpan or search on metacpan
carton.lock view on Meta::CPAN
"IO::File" : "0",
"IO::String" : "0",
"Locale::US" : "0",
"Module::Info" : "0",
"Module::Refresh" : "0",
"PadWalker" : "0",
"Params::Coerce" : "0",
"Regexp::Common" : "0",
"SUPER" : "0",
"Test::Deep" : "0",
"Test::DependentModules" : "0.13",
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Hash/Extract.pm view on Meta::CPAN
# $Id: /perl/Hash-Extract/lib/Hash/Extract.pm 580 2007-12-19T06:29:03.536065Z hio $
# -----------------------------------------------------------------------------
package Hash::Extract;
use strict;
use warnings;
use PadWalker qw(var_name);
use B;
use base 'Exporter';
our @EXPORT_OK = qw(hash_extract);
our %EXPORT_TAGS = (
lib/Hash/Extract.pm view on Meta::CPAN
=back
=head1 SEE ALSO
L<PadWalker>
=head1 COPYRIGHT & LICENSE
Copyright 2006-2007 YAMASHINA Hio, all rights reserved.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Sub/Uplevel.pm view on Meta::CPAN
#pod
#pod See http://www.perl.com/perl/misc/Artistic.html
#pod
#pod =head1 SEE ALSO
#pod
#pod PadWalker (for the similar idea with lexicals), Hook::LexWrap,
#pod Tcl's uplevel() at http://www.scriptics.com/man/tcl8.4/TclCmd/uplevel.htm
#pod
#pod =cut
1;
view all matches for this distribution