home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / Share / Editores / Perl5 / patches / Storable-0.5-win32.patch < prev    next >
Encoding:
Text File  |  1997-08-10  |  1.5 KB  |  49 lines

  1. diff -ur Storable-0.5@0/Storable.pm Storable-0.5/Storable.pm
  2. --- Storable-0.5@0/Storable.pm    Mon Jun 23 02:03:26 1997
  3. +++ Storable-0.5/Storable.pm    Mon Jun 23 01:57:29 1997
  4. @@ -62,6 +62,7 @@
  5.      croak "Too many arguments" unless @_ == 1;    # Watch out for @foo in arglist
  6.      local *FILE;
  7.      open(FILE, ">$file") || croak "Can't create $file: $!";
  8. +    binmode FILE;
  9.      my $ret;
  10.      # Call C routine nstore or pstore, depending on network order
  11.      eval { $ret = $netorder ? net_pstore(FILE, $self) : pstore(FILE, $self) };
  12. @@ -148,6 +149,7 @@
  13.      my ($file) = @_;
  14.      local *FILE;
  15.      open(FILE, "$file") || croak "Can't open $file: $!";
  16. +    binmode FILE;
  17.      my $self;
  18.      eval { $self = pretrieve(FILE) };        # Call C routine
  19.      close(FILE);
  20. @@ -315,6 +317,9 @@
  21.  references, will probably differ from the original addresses. The
  22.  topology of your structure is preserved, but not hidden semantics
  23.  like those.
  24. +
  25. +On platforms where it matters, be sure to call C<binmode()> on the
  26. +descriptors that you pass to Storable functions.
  27.  
  28.  =head1 BUGS
  29.  
  30. diff -ur Storable-0.5@0/t/store.t Storable-0.5/t/store.t
  31. --- Storable-0.5@0/t/store.t    Mon Jun 23 02:03:26 1997
  32. +++ Storable-0.5/t/store.t    Mon Jun 23 02:01:52 1997
  33. @@ -60,6 +60,7 @@
  34.  
  35.  print "not " unless open(OUT, '>>t/store');
  36.  print "ok 7\n";
  37. +binmode OUT;
  38.  
  39.  print "not " unless defined store_fd(\@a, ::OUT);
  40.  print "ok 8\n";
  41. @@ -72,6 +73,7 @@
  42.  print "ok 11\n";
  43.  
  44.  print "not " unless open(OUT, 't/store');
  45. +binmode OUT;
  46.  
  47.  $r = retrieve_fd(::OUT);
  48.  print "not " unless defined $r;
  49.