[Bps-public-commit] r14976 - Prophet/trunk/lib/Prophet/Replica
jesse at bestpractical.com
jesse at bestpractical.com
Sun Aug 10 03:41:03 EDT 2008
Author: jesse
Date: Sun Aug 10 03:41:03 2008
New Revision: 14976
Modified:
Prophet/trunk/lib/Prophet/Replica/Native.pm
Log:
slurp changes were ill-advised
Modified: Prophet/trunk/lib/Prophet/Replica/Native.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Replica/Native.pm (original)
+++ Prophet/trunk/lib/Prophet/Replica/Native.pm Sun Aug 10 03:41:03 2008
@@ -660,7 +660,7 @@
my $self = shift;
my ($file) = validate_pos( @_, 1 );
if ( $self->fs_root ) {
- return eval { $self->_slurp (file( $self->fs_root => $file )) };
+ return eval { scalar file( $self->fs_root => $file )->slurp };
} else { # http replica
return LWP::Simple::get( $self->url . "/" . $file );
}
@@ -668,14 +668,6 @@
}
-sub _slurp {
- my $self = shift;
- my $abspath = shift;
-
- open (my $fh, "<", "$abspath") || die $!;
- local $/;
- return scalar <$fh>;
-}
sub begin_edit {
my $self = shift;
More information about the Bps-public-commit
mailing list