[Bps-public-commit] r14968 - Prophet/trunk/lib/Prophet/Replica

jesse at bestpractical.com jesse at bestpractical.com
Sat Aug 9 19:16:14 EDT 2008


Author: jesse
Date: Sat Aug  9 19:16:14 2008
New Revision: 14968

Modified:
   Prophet/trunk/lib/Prophet/Replica/Native.pm

Log:
* A small performance optimization to how we load files from the native replica

Modified: Prophet/trunk/lib/Prophet/Replica/Native.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Replica/Native.pm	(original)
+++ Prophet/trunk/lib/Prophet/Replica/Native.pm	Sat Aug  9 19:16:14 2008
@@ -652,7 +652,7 @@
     if ( $self->fs_root ) {
         my $qualified_file = file( $self->fs_root => $file );
         return undef unless dir($self->fs_root)->subsumes($qualified_file);
-        return scalar $qualified_file->slurp if  $self->_file_exists($file);
+        return eval { scalar $qualified_file->slurp };
         return undef;
     } else {    # http replica
         return LWP::Simple::get( $self->url . "/" . $file );



More information about the Bps-public-commit mailing list