Eval-Quosure

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

         }
      },
      "develop" : {
         "requires" : {
            "Test::Pod" : "1.41"
         }
      },
      "runtime" : {
         "requires" : {
            "List::Util" : "1.28",
            "PadWalker" : "2.3",
            "Safe::Isa" : "1.000009",
            "Sub::Quote" : "2.005",
            "Type::Params" : "1.004004",
            "Types::Standard" : "0",
            "perl" : "5.010",
            "strict" : "0",
            "warnings" : "0"
         }
      },
      "test" : {

META.yml  view on Meta::CPAN

meta-spec:
  url: http://module-build.sourceforge.net/META-spec-v1.4.html
  version: '1.4'
name: Eval-Quosure
provides:
  Eval::Quosure:
    file: lib/Eval/Quosure.pm
    version: '0.001002'
requires:
  List::Util: '1.28'
  PadWalker: '2.3'
  Safe::Isa: '1.000009'
  Sub::Quote: '2.005'
  Type::Params: '1.004004'
  Types::Standard: '0'
  perl: '5.010'
  strict: '0'
  warnings: '0'
resources:
  repository: https://github.com/iynehz/perl5-Eval-Quosure.git
version: '0.001002'

Makefile.PL  view on Meta::CPAN

  "AUTHOR" => "Stephan Loyd <sloyd\@cpan.org>",
  "CONFIGURE_REQUIRES" => {
    "ExtUtils::MakeMaker" => 0
  },
  "DISTNAME" => "Eval-Quosure",
  "LICENSE" => "perl",
  "MIN_PERL_VERSION" => "5.010",
  "NAME" => "Eval::Quosure",
  "PREREQ_PM" => {
    "List::Util" => "1.28",
    "PadWalker" => "2.3",
    "Safe::Isa" => "1.000009",
    "Sub::Quote" => "2.005",
    "Type::Params" => "1.004004",
    "Types::Standard" => 0,
    "strict" => 0,
    "warnings" => 0
  },
  "TEST_REQUIRES" => {
    "Test2::V0" => 0
  },
  "VERSION" => "0.001002",
  "test" => {
    "TESTS" => "t/*.t"
  }
);


my %FallbackPrereqs = (
  "List::Util" => "1.28",
  "PadWalker" => "2.3",
  "Safe::Isa" => "1.000009",
  "Sub::Quote" => "2.005",
  "Test2::V0" => 0,
  "Type::Params" => "1.004004",
  "Types::Standard" => 0,
  "strict" => 0,
  "warnings" => 0
);


README  view on Meta::CPAN

    combines an expression and an environment in which the expression can
    be evaluated.

    Note that as this is string eval so is not secure. USE IT WITH CAUTION!

CONSTRUCTION

        new(Str $expr, $level=0)

    $expr is a string. $level is used like the argument of caller and
    PadWalker's peek_my, 0 is for the scope that creates the quosure
    object, 1 is for the upper scope of the scope that creates the quosure,
    and so on.

METHODS

 expr

    Get the expression stored in the object.

 captures

lib/Eval/Quosure.pm  view on Meta::CPAN


# ABSTRACT: Evaluate within a caller environment

use 5.010;
use strict;
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);

sub new {
    state $check = Type::Params::compile( Str, Optional [Int] );

    my $class = shift;
    my ( $expr, $level ) = $check->(@_);

lib/Eval/Quosure.pm  view on Meta::CPAN

that combines an expression and an environment in which the expression
can be evaluated. 

Note that as this is string eval so is not secure. USE IT WITH CAUTION!

=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

=head2 expr

Get the expression stored in the object.

=head2 captures



( run in 1.103 second using v1.01-cache-2.11-cpan-05444aca049 )