Author: jkeenan
Date: Sun Jan  4 12:48:46 2009
New Revision: 34936

Modified:
   trunk/lib/Parrot/Distribution.pm

Log:
Restore slurp() method.

Modified: trunk/lib/Parrot/Distribution.pm
==============================================================================
--- trunk/lib/Parrot/Distribution.pm    (original)
+++ trunk/lib/Parrot/Distribution.pm    Sun Jan  4 12:48:46 2009
@@ -34,6 +34,8 @@
 
 use ExtUtils::Manifest;
 use File::Spec;
+use lib qw( lib );
+use Parrot::BuildUtil ();
 
 use base 'Parrot::Docs::Directory';
 
@@ -782,6 +784,23 @@
     };
 }
 
+sub slurp {
+    my $self = shift;
+    my $path = shift;
+    my $buf;
+
+    # slurp in the file
+    open( my $fh, '<', $path )
+        or die "Cannot open '$path' for reading: $!\n";
+    {
+        local $/;
+        $buf = <$fh>;
+    }
+    close $fh;
+
+    return $buf;
+}
+
 1;
 
 # Local Variables:

Reply via email to