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.033001, feature => 'multidimensional';
no if "$]" >= 5.033006, feature => 'bareword_filehandles';
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.22';
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
view release on metacpan or search on metacpan
lib/JSON/Eval.pm view on Meta::CPAN
sub deparse_object {
my $self = shift;
my ($o) = @_;
if (ref $o eq 'CODE') {
require PadWalker;
my $lexicals = PadWalker::closed_over($o);
if (keys %$lexicals) {
require Carp;
Carp::croak("Cannot serialize coderef that closes over lexical variables to JSON: ".join ",", sort keys %$lexicals);
}
require B::Deparse;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Kavorka.pm view on Meta::CPAN
use warnings;
no warnings 'void';
use Carp ();
use Exporter::Tiny ();
use PadWalker ();
use Parse::Keyword ();
use Module::Runtime ();
use Scalar::Util ();
use Sub::Util ();
lib/Kavorka.pm view on Meta::CPAN
# Workarounds for closure issues in Parse::Keyword
if ($subroutine->is_anonymous)
{
my $orig = $r[0];
my $caller_vars = PadWalker::peek_my(1);
@r = Sub::Util::set_subname($subroutine->package."::__ANON__", sub {
$subroutine->_poke_pads($caller_vars);
goto $orig;
});
&Scalar::Util::set_prototype($r[0], $_) for grep defined, prototype($orig);
$INFO{ $r[0] } = $subroutine;
Scalar::Util::weaken($INFO{ $r[0] });
}
else
{
$subroutine->_poke_pads( PadWalker::peek_my(1) );
}
# Prevents a cycle between %INFO and $subroutine.
Scalar::Util::weaken($subroutine->{body})
unless Scalar::Util::isweak($subroutine->{body});
lib/Kavorka.pm view on Meta::CPAN
attributes don't work properly for anonymous functions.
=item *
This module is based on L<Parse::Keyword>, which has a chronically
broken implementation of closures. Kavorka uses L<PadWalker> to attempt
to work around the problem. This mostly seems to work, but you may
experience some problems in edge cases, especially for anonymous
functions and methods.
=item *
view all matches for this distribution
view release on metacpan or search on metacpan
lib/KiokuDB/TypeMap/Entry/Closure.pm view on Meta::CPAN
$KiokuDB::TypeMap::Entry::Closure::VERSION = '0.57';
use Moose;
use Carp qw(croak);
use Scalar::Util qw(refaddr);
use PadWalker 1.9;
use Class::Load ();
no warnings 'recursion';
use namespace::clean -except => 'meta';
lib/KiokuDB/TypeMap/Entry/Closure.pm view on Meta::CPAN
my %data;
# FIXME make this customizable on a per sub and per typemap level
if ( $name eq '__ANON__' ) {
my $pad = PadWalker::closed_over($sub);
if ( keys %$pad ) {
my $collapsed_pad = $collapser->visit($pad);
$data{pad} = $collapsed_pad;
lib/KiokuDB/TypeMap/Entry/Closure.pm view on Meta::CPAN
";
my $e = $@;
$linker->queue_finalizer(sub {
PadWalker::set_closed_over($sub, $pad);
}) if $sub;
( $sub, $e );
} else {
eval "sub $body", $@;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Lexical/Accessor.pm view on Meta::CPAN
Lexical::Accessor is almost three times faster than
L<MooX::PrivateAttributes>, and almost twenty time faster than
L<MooseX::Privacy>. I'd also argue that it's a more "correct"
implementation of private accessors as (short of performing impressive
L<PadWalker> manipulations), the accessors generated by this module
are completely invisible to subclasses, method dispatch, etc.
Compared to the usual Moose convention of using a leading underscore
to indicate a private method (which is a very loose convention; it is
quite common for subclasses to override such methods!),
view all matches for this distribution
view release on metacpan or search on metacpan
0.000007 Thu Nov 13 16:09:17 2014
- Simplified and sharpened t/inner_scalar.t
which also removed the requirement for PadWalker
(thanks Father C!)
0.001000 Tue Jul 4 17:54:22 2023
view all matches for this distribution