Devel-REPL-InProcess

 view release on metacpan or  search on metacpan

Build.PL  view on Meta::CPAN


my $build = Module::Build->new(
    module_name => 'Devel::REPL::InProcess',
    license     => 'perl',
    script_files=> ['scripts/inprocess-repl-client'],
    requires    => {
        'perl'                  => '5.10.0',
        'AnyEvent'              => '1.0031',
        'Devel::REPL'           => '1.003012',
        'Term::ReadKey'         => '2.30',
        'PadWalker'             => '2.2',
        'IO::Pty'               => '1.12',
        'Term::ReadLine'        => '1.14',
    },
    configure_requires => {
        'Module::Build' => 0.42,
    },
    test_requires => {
        'Test::Differences'     => 0,
    },
    meta_merge  => {

META.json  view on Meta::CPAN

      "configure" : {
         "requires" : {
            "Module::Build" : "0.42"
         }
      },
      "runtime" : {
         "requires" : {
            "AnyEvent" : "1.0031",
            "Devel::REPL" : "1.003012",
            "IO::Pty" : "1.12",
            "PadWalker" : "2.2",
            "Term::ReadKey" : "2.30",
            "Term::ReadLine" : "1.14",
            "perl" : "v5.10.0"
         }
      },
      "test" : {
         "requires" : {
            "Test::Differences" : "0"
         }
      }

META.yml  view on Meta::CPAN

    file: lib/Devel/REPL/InProcess.pm
    version: '0.05'
  Devel::REPL::Plugin::InProcess:
    file: lib/Devel/REPL/Plugin/InProcess.pm
  Devel::REPL::Server::Select:
    file: lib/Devel/REPL/Server/Select.pm
requires:
  AnyEvent: '1.0031'
  Devel::REPL: '1.003012'
  IO::Pty: '1.12'
  PadWalker: '2.2'
  Term::ReadKey: '2.30'
  Term::ReadLine: '1.14'
  perl: v5.10.0
resources:
  bugtracker: https://github.com/mbarbon/devel-repl-inprocess/issues
  license: http://dev.perl.org/licenses/
  repository: https://github.com/mbarbon/devel-repl-inprocess.git
version: '0.05'
x_serialization_backend: 'CPAN::Meta::YAML version 0.012'

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',
);

has '_package' => (
    isa     => 'Str',
    is      => 'rw',

lib/Devel/REPL/Plugin/InProcess.pm  view on Meta::CPAN

        if $skip && $skip >= @found_level;
    my ($found_level, $found_eval) = ($found_level[$skip], $found_eval[$skip]);

    my ($package, $filename, $line, $subroutine, $hasargs,
        $wantarray, $evaltext, $is_require, $hints, $bitmask, $hinthash) =
            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 =~ /^\$/) {
            $cxt->{$key} = ${$my->{$key}};
        } else {
            $cxt->{$key} = $my->{$key};
        }
    }



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