[Bps-public-commit] r14975 - in Prophet/trunk: .

sartak at bestpractical.com sartak at bestpractical.com
Sun Aug 10 02:51:54 EDT 2008


Author: sartak
Date: Sun Aug 10 02:51:53 2008
New Revision: 14975

Modified:
   Prophet/trunk/   (props changed)
   Prophet/trunk/lib/Prophet/Replica/Native.pm

Log:
 r69098 at onn:  sartak | 2008-08-10 02:51:33 -0400
 Don't read into an array of lines and then join it, just do it in C :)


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 02:51:53 2008
@@ -671,11 +671,10 @@
 sub _slurp {
     my $self = shift;
     my $abspath = shift;
-    open (my $fh, "<", "$abspath") || die $!;
-    my @lines = <$fh>;
-    close $fh;
-    return join('', at lines);
 
+    open (my $fh, "<", "$abspath") || die $!;
+    local $/;
+    return scalar <$fh>;
 }
 
 sub begin_edit {



More information about the Bps-public-commit mailing list