remove slurp dependency

--HG--
branch : pmacs2
This commit is contained in:
moculus 2008-06-20 02:05:28 +00:00
parent 7a3d761c35
commit c35f0f162b
1 changed files with 3 additions and 2 deletions

View File

@ -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') {