Background:  Perl on VMS has an fwrite() replacement because it is easy when 
writing to record-oriented files to get a new record on each write 
operation, which is usually not what you want.

Foreground:  The docs to fwrite() state that it should return the number of 
items written, but my_fwrite() always returns 1 for success.  This works 
fine when you only ask it to write 1 item, which is apparently all that ever 
happens in the Perl core.  Storable apparently works it a bit harder, and 
was being told 1 item got written when it had asked for more.  With the 
following microscopic patch, all the Storable tests pass:

--- vms/vms.c;-1        Tue Aug 29 17:41:26 2000
+++ vms/vms.c   Wed Aug 30 12:25:36 2000
@@ -4709,7 +4709,7 @@
     src = cp + 1;
   }
 
-  return 1;
+  return nitm;
 
 }  /* end of my_fwrite() */
 /*}}}*/
[end of patch]

Now the Storable tests look like this:

[.lib]st-06compat.......ok
[.lib]st-blessed........ok
[.lib]st-canonical......ok
[.lib]st-dclone.........ok
[.lib]st-forgive........ok
[.lib]st-freeze.........ok
[.lib]st-overload.......ok
[.lib]st-recurse........ok
[.lib]st-retrieve.......ok
[.lib]st-store..........ok
[.lib]st-tied...........ok
[.lib]st-tiedhook.......ok
[.lib]st-tieditems......ok

Side note/status update:  We are down to only 2 test failures, the second of 
which was probably introduced by Jarkko's change of yesterday since it 
worked before that:

[.lib]ftmp-posix........FAILED on test 6
[.lib]ftmp-security.....FAILED on test 9
.  .  .
Failed 2/249 tests, 95.18% okay.
_______________________________________________
Craig A. Berry                                   
mailto:[EMAIL PROTECTED]

Reply via email to