parent
7a3d761c35
commit
c35f0f162b
|
@ -8,7 +8,6 @@
|
|||
use Data::Dumper qw(Dumper);
|
||||
use File::Basename qw();
|
||||
use Getopt::Long qw();
|
||||
use Perl6::Slurp qw(slurp);
|
||||
use Scalar::Util qw();
|
||||
|
||||
# NOTE: some Term::ReadLine implementations don't support features that we sort
|
||||
|
@ -302,7 +301,9 @@ sub run {
|
|||
die "failed to eval '$pair->[1]': $@" if $@;
|
||||
} elsif($pair->[0] eq 'run') {
|
||||
die "no path named $pair->[1] found" unless -e $pair->[1];
|
||||
my $data = slurp($pair->[1]);
|
||||
open(FH, $pair->[1]);
|
||||
my $data = join("", <FH>);
|
||||
close(FH);
|
||||
$PKG = eval "$data; return __PACKAGE__";
|
||||
die "failed to run $pair->[1]: $@" if $@;
|
||||
} elsif($pair->[0] eq 'use') {
|
||||
|
|
Loading…
Reference in New Issue