develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r33803 - trunk/runtime/parrot/library/Config

From:
particle
Date:
December 11, 2008 10:18
Subject:
[svn:parrot] r33803 - trunk/runtime/parrot/library/Config
Message ID:
20081211181817.DD2CFCB9AF@x12.develooper.com
Author: particle
Date: Thu Dec 11 10:18:17 2008
New Revision: 33803

Modified:
   trunk/runtime/parrot/library/Config/JSON.pir

Log:
[library] fix Config/JSON.pir to use 'readall' instead of deprecated 'slurp'

Modified: trunk/runtime/parrot/library/Config/JSON.pir
==============================================================================
--- trunk/runtime/parrot/library/Config/JSON.pir	(original)
+++ trunk/runtime/parrot/library/Config/JSON.pir	Thu Dec 11 10:18:17 2008
@@ -20,17 +20,17 @@
 
     # Slurp in the file
     .local string text
-    .local pmc pio
+    .local pmc fh
 
-    pio = open filename, '<'
-    if pio goto slurp_file
+    fh = open filename, '<'
+    if fh goto slurp_file
     $P0 = new 'Exception'
     $S0 = concat "can't open file: ", filename
     $P0 = $S0
     throw $P0
 
   slurp_file:
-    text = pio.'slurp'(filename)
+    text = fh.'readall'()
 
     # convert the text to an object and return it.
     load_bytecode 'compilers/json/JSON.pbc'



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About