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

[svn:parrot] r34602 - branches/pdd22io_part3/t/pmc

From:
allison
Date:
December 29, 2008 19:09
Subject:
[svn:parrot] r34602 - branches/pdd22io_part3/t/pmc
Message ID:
20081230030941.11B45CB9FA@x12.develooper.com
Author: allison
Date: Mon Dec 29 19:09:40 2008
New Revision: 34602

Modified:
   branches/pdd22io_part3/t/pmc/stringhandle.t

Log:
[pdd22io] Reuse the stringhandle we wrote to, rather than creating a new empty one.


Modified: branches/pdd22io_part3/t/pmc/stringhandle.t
==============================================================================
--- branches/pdd22io_part3/t/pmc/stringhandle.t	(original)
+++ branches/pdd22io_part3/t/pmc/stringhandle.t	Mon Dec 29 19:09:40 2008
@@ -155,16 +155,15 @@
 
     \$P0.'close'()
 
-    \$P1 = new 'StringHandle'
-    \$P1.'open'('temp_file', 'r')
+    \$P0.'open'('temp_file', 'r')
 
-    \$S0 = \$P1.'read'(3) # bytes
+    \$S0 = \$P0.'read'(3) # bytes
     if \$S0 == "123" goto ok_5
     print 'not '
   ok_5:
     say 'ok 5 - read integer back from file'
 
-    \$S0 = \$P1.'read'(16) # bytes
+    \$S0 = \$P0.'read'(16) # bytes
     if \$S0 == "456.789squawk\\n42" goto ok_6
     say \$S0
 
@@ -172,7 +171,7 @@
   ok_6:
     say 'ok 6 - read string back from file'
 
-    \$P1.'close'()
+    \$P0.'close'()
 .end
 CODE
 ok 1 - $P0.print($I1)



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