1 Thu Oct 3 08:57:22 IST 2002 Abhijit Menon-Sen <ams@wiw.org>
5 Adds support for CODE references from Slaven Rezic
6 <slaven.rezic@berlin.de>.
8 Fri Jun 7 23:55:41 BST 2002 Nicholas Clark
12 Bug fix from Radu Greab <radu@netsoft.ro> (plus regression test)
13 to fix a recently introduced bug detected by Dave Rolsky.
14 Bug was that for a non threaded build, the class information was
15 being lost at freeze time on the first object with a STORABLE_freeze
16 hook. Consequentially the object was not blessed at all when thawed.
17 (The presence (or lack) of STORABLE_thaw was irrelevant; this was
18 a store-time data lost bug, caused by failure to initialize internal
20 The bug was introduced as development perl change 16442 (on
21 2002/05/07), so has been present since 2.00.
22 Patches to introduce more regression tests to reduce the chance of
23 a reoccurance of this sort of goof are always welcome.
25 Thu May 30 20:31:08 BST 2002 Nicholas Clark <nick@ccl4.org>
27 Version 2.03 Header changes on 5.6.x on Unix where IV is long long
29 5.6.x introduced the ability to have IVs as long long. However,
30 Configure still defined BYTEORDER based on the size of a long.
31 Storable uses the BYTEORDER value as part of the header, but
32 doesn't explicity store sizeof(IV) anywhere in the header.
33 Hence on 5.6.x built with IV as long long on a platform that
34 uses Configure (ie most things except VMS and Windows) headers
35 are identical for the different IV sizes, despite the files
36 containing some fields based on sizeof(IV)
38 5.8.0 is consistent; all platforms have BYTEORDER in config.h
39 based on sizeof(IV) rather than sizeof(long). This means that
40 the value of BYTEORDER will change from (say) 4321 to 87654321
41 between 5.6.1 and 5.8.0 built with the same options to Configure
42 on the same machine. This means that the Storable header will
43 differ, and the two versions will wrongly thing that they are
46 For the benefit of long term consistency, Storable now
47 implements the 5.8.0 BYTEORDER policy on 5.6.x. This means that
48 2.03 onwards default to be incompatible with 2.02 and earlier
49 (ie the large 1.0.x installed base) on the same 5.6.x perl.
51 To allow interworking, a new variable
52 $Storable::interwork_56_64bit is introduced. It defaults to
53 false. Set it to true to read and write old format files. Don't
54 use it unless you have existing stored data written with 5.6.x
55 that you couldn't otherwise read, or you need to interwork with
56 a machine running older Storable on a 5.6.x with long long IVs
57 (i.e., you probably don't need to use it).
59 Sat May 25 22:38:39 BST 2002 Nicholas Clark <nick@ccl4.org>
63 Rewrite Storable.xs so that the file header structure for write_magic
64 is built at compile time, and check_magic attempts to the header in
65 blocks rather than byte per byte. These changes make the compiled
66 extension 2.25% smaller, but are not significant enough to give a
69 Thu May 23 22:50:41 BST 2002 Nicholas Clark <nick@ccl4.org>
73 - New regression tests integer.t
74 - Add code to safely store large unsigned integers.
75 - Change code not to attempt to store large integers (ie > 32 bits)
76 in network order as 32 bits.
78 *Never* underestimate the value of a pathological test suite carefully
79 crafted with maximum malice before writing a line of real code. It
80 prevents crafty bugs from stowing away in your released code.
81 It's much less embarrassing to find them before you ship.
82 (Well, never underestimate it if you ever want to work for me)
84 Fri May 17 22:48:59 BST 2002 Nicholas Clark <nick@ccl4.org>
86 Version 2.0, binary format 2.5 (but writes format 2.4 on pre 5.7.3)
88 The perl5 porters have decided to make sure that Storable still
89 builds on pre-5.8 perls, and make the 5.8 version available on CPAN.
90 The VERSION is now 2.0, and it passes all tests on 5.005_03, 5.6.1
91 and 5.6.1 with threads. On 5.6.0 t/downgrade.t fails tests 34 and 37,
92 due to a bug in 5.6.0 - upgrade to 5.6.1.
94 Jarkko and I have collated the list of changes the perl5 porters have
95 from the perl5 Changes file:
97 - data features of upcoming perl 5.8.0 are supported: Unicode hash
98 keys (Unicode hash values have been supported since Storable 1.0.1)
99 and "restricted hashes" (readonly hashes and hash entries)
100 - a newer version of perl can now be used to serialize data which is
101 not supported in earlier perls: Storable will attempt to do the
102 right thing for as long as possible, croaking only when safe data
103 conversion simply isn't possible. Alternatively earlier perls can
104 opt to have a lossy downgrade data instead of croaking
105 - when built with perls pre 5.7.3 this Storable writes out files
106 with binary format 2.4, the same format as Storable 1.0.8 onwards.
107 This should mean that this Storable will inter-operate seamlessly
108 with any Storable 1.0.8 or newer on perls pre 5.7.3
109 - dclone() now works with empty string scalar objects
110 - retrieving of large hashes is now more efficient
111 - more routines autosplit out of the main module, so Storable should
112 load slightly more quickly
113 - better documentation
114 - the internal context objects are now freed explicitly, rather than
115 relying on thread or process exit
116 - bugs fixed in debugging trace code affecting builds made with 64 bit
118 - code tidy-ups to allow clean compiles with more warning options
119 turned on avoid problems with $@ getting corrupted on 5.005_03 if
120 Carp wasn't already loaded
121 - added &show_file_magic, so you can add to /etc/magic and teach
122 Unix's file command about Storable files
124 We plan to keep Storable on CPAN in sync with the Perl core, so
125 if you encounter bugs or other problems building or using Storable,
126 please let us know at perl5-porters@perl.org
129 Sat Dec 1 14:37:54 MET 2001 Raphael Manfredi <Raphael_Manfredi@pobox.com>
131 This is the LAST maintenance release of the Storable module.
132 Indeed, Storable is now part of perl 5.8, and will be maintained
133 as part of Perl. The CPAN module will remain available there
134 for people running pre-5.8 perls.
136 Avoid requiring Fcntl upfront, useful to embedded runtimes.
137 Use an eval {} for testing, instead of making Storable.pm
138 simply fail its compilation in the BEGIN block.
140 store_fd() will now correctly autoflush file if needed.
142 Tue Aug 28 23:53:20 MEST 2001 Raphael Manfredi <Raphael_Manfredi@pobox.com>
144 Fixed truncation race with lock_retrieve() in lock_store().
145 The file has to be truncated only once the exclusive lock is held.
147 Removed spurious debugging messages in .xs file.
149 Sun Jul 1 13:27:32 MEST 2001 Raphael Manfredi <Raphael_Manfredi@pobox.com>
151 Systematically use "=over 4" for POD linters.
152 Apparently, POD linters are much stricter than would
153 otherwise be needed, but that's OK.
155 Fixed memory corruption on croaks during thaw(). Thanks
156 to Claudio Garcia for reproducing this bug and providing the
157 code to exercise it. Added test cases for this bug, adapted
160 Made code compile cleanly with -Wall (from Jarkko Hietaniemi).
162 Changed tagnum and classnum from I32 to IV in context. Also
165 Thu Mar 15 01:22:32 MET 2001 Raphael Manfredi <Raphael_Manfredi@pobox.com>
167 Last version was wrongly compiling with assertions on, due
168 to an edit glitch. That did not cause any problem (apart from
169 a slight performance loss) excepted on Win* platforms, where the
170 assertion code does not compile.
172 Sat Feb 17 13:37:37 MET 2001 Raphael Manfredi <Raphael_Manfredi@pobox.com>
176 Forgot to increase version number at previous patch (there were
177 two of them, which is why we jump from 1.0.8 to 1.0.10).
179 Sat Feb 17 13:35:00 MET 2001 Raphael Manfredi <Raphael_Manfredi@pobox.com>
181 Version 1.0.8, binary format 2.4.
183 Fixed incorrect error message.
185 Now bless objects ASAP at retrieve time, which is meant to fix
188 * Indirect references to overloaded object were not able to
189 restore overloading if the object was not blessed yet,
190 which was possible since blessing occurred only after the
193 * Storable hooks asking for serialization of blessed ref could
194 get un-blessed refs at retrieval time, for the very same
197 The fix implemented here was suggested by Nick Ing-Simmons.
199 Added support for blessed ref to tied structures. This is the
200 cause for the binary format change.
202 Added EBCDIC version of the compatibility test with 0.6.11,
205 Added tests for the new features, and to make sure the bugs they
206 are meant to fix are indeed fixed.
208 Wed Jan 3 10:43:18 MET 2001 Raphael Manfredi <Raphael_Manfredi@pobox.com>
210 Removed spurious 'clean' entry in Makefile.PL.
212 Added CAN_FLOCK to determine whether we can flock() or not,
213 by inspecting Perl's configuration parameters, as determined
216 Trace offending package when overloading cannot be restored
219 Made context cleanup safer to avoid dup freeing, mostly in the
220 presence of repeated exceptions during store/retrieve (which can
221 cause memory leaks anyway, so it's just additional safety, not a
224 Sun Nov 5 18:23:48 MET 2000 Raphael Manfredi <Raphael_Manfredi@pobox.com>
228 Fixed severe "object lost" bug for STORABLE_freeze returns,
229 when refs to lexicals, taken within the hook, were to be
230 serialized by Storable. Enhanced the t/recurse.t test to
231 stress hook a little more with refs to lexicals.
233 Thu Oct 26 19:14:38 MEST 2000 Raphael Manfredi <Raphael_Manfredi@pobox.com>
237 Documented that store() and retrieve() can return undef.
238 That is, the error reporting is not always made via exceptions,
239 as the paragraph on error reporting was implying.
241 Auto requires module of blessed ref when STORABLE_thaw misses.
242 When the Storable engine looks for the STORABLE_thaw hook and
243 does not find it, it now tries to require the package into which
244 the blessed reference is.
246 Just check $^O, in t/lock.t: there's no need to pull the whole
247 Config module for that.
249 Mon Oct 23 20:03:49 MEST 2000 Raphael Manfredi <Raphael_Manfredi@pobox.com>
253 Protected calls to flock() for DOS platform: apparently, the
254 flock/fcnlt emulation is reported to be broken on that
257 Added logcarp emulation if they don't have Log::Agent, since
258 we now use it to carp when lock_store/lock_retrieve is used
261 Fri Sep 29 21:52:29 MEST 2000 Raphael Manfredi <Raphael_Manfredi@pobox.com>
265 Avoid using "tainted" and "dirty" since Perl remaps them via
266 cpp (i.e. #define). This is deeply harmful when threading
267 is enabled. This concerned both the context structure and
268 local variable and argument names. Brrr..., scary!
270 Thu Sep 28 23:46:39 MEST 2000 Raphael Manfredi <Raphael_Manfredi@pobox.com>
274 Fixed spelling in README.
276 Added lock_store, lock_nstore, and lock_retrieve (advisory locking)
277 after a proposal from Erik Haugan <erik@solbors.no>.
279 Perls before 5.004_04 lack newSVpvn, added remapping in XS.
281 Fixed stupid typo in the t/utf8.t test.
283 Sun Sep 17 18:51:10 MEST 2000 Raphael Manfredi <Raphael_Manfredi@pobox.com>
285 Version 1.0.1, binary format 2.3.
287 Documented that doubles are stored stringified by nstore().
289 Added Salvador Ortiz Garcia in CREDITS section, He identified
290 a bug in the store hooks and proposed the right fix: the class
291 id was allocated too soon. His bug case was also added to
292 the regression test suite.
294 Now only taint retrieved data when source was tainted. A bug
295 discovered by Marc Lehmann.
297 Added support for UTF-8 strings, a contribution of Marc Lehmann.
298 This is normally only activated in post-5.6 perls.
300 Thu Aug 31 23:06:06 MEST 2000 Raphael Manfredi <Raphael_Manfredi@pobox.com>
302 First official release Storable 1.0, for inclusion in perl 5.7.0.
303 The license scheme is now compatible with Perl's.
305 Thu Aug 24 01:02:02 MEST 2000 Raphael Manfredi <Raphael_Manfredi@pobox.com>
307 ANSI-fied most of the code, preparing for Perl core integration.
308 The next version of Storable will be 0.8, and will be integrated
309 into the Perl core (development branch).
311 Dispatch tables were moved upfront to relieve some compilers,
312 especially on AIX and Windows platforms.
314 Merged 64-bit fixes from perl5-porters.
316 Mon Aug 14 09:22:04 MEST 2000 Raphael Manfredi <Raphael_Manfredi@pobox.com>
318 Added a refcnt dec in retrieve_tied_key(): sv_magic() increases
319 the refcnt on the mg_ptr as well.
321 Removed spurious dependency to Devel::Peek, which was used for
322 testing only in t/tied_items.t. Thanks to Conrad Heiney
323 <conrad@fringehead.org> for spotting it first.
325 Sun Aug 13 22:12:59 MEST 2000 Raphael Manfredi <Raphael_Manfredi@pobox.com>
327 Marc Lehmann kindly contributed code to add overloading support
328 and to handle references to tied variables.
330 Rewrote leading blurb about compatibility to make it clearer what
331 "backward compatibility" is about: when I say 0.7 is backward
332 compatible with 0.6, it means the revision 0.7 can read files
335 Mention new Clone(3) extension in SEE ALSO.
337 Was wrongly optimizing for "undef" values in hashes by not
338 fully recursing: as a result, tied "undef" values were incorrectly
341 Sun Jul 30 12:59:17 MEST 2000 Raphael Manfredi <Raphael_Manfredi@pobox.com>
343 First revision of Storable 0.7.
345 The serializing format is new, known as version 2.0. It is fully
346 backward compatible with 0.6. Earlier formats are deprecated and
347 have not even been tested: next version will drop pre-0.6 format.
349 Changes since 0.6@11:
351 - Moved interface to the "beta" status. Some tiny parts are still
352 subject to change, but nothing important enough to warrant an "alpha"
355 - Slightly reduced the size of the Storable image by factorizing
356 object class names and removing final object storage notification due
357 to a redesign of the blessed object storing.
359 - Classes can now redefine how they wish their instances to be serialized
360 and/or deep cloned. Serializing hooks are written in Perl code.
362 - The engine is now fully re-entrant.
364 Sun Apr 2 23:47:50 MEST 2000 Raphael Manfredi <Raphael_Manfredi@pobox.com>
366 Added provision to detect more recent binary formats, since
367 the new upcoming Storable-0.7 will use a different format.
368 In order to prevent attempting the de-serialization of newer
369 formats by older versions, I'm adding this now to the 0.6 series.
371 I'm expecting this revision to be the last of the 0.6 series.
372 Unless it does not work with perl 5.6, which I don't use yet,
373 and therefore against which I cannot test.
375 Wed Mar 29 19:55:21 MEST 2000 Raphael Manfredi <Raphael_Manfredi@pobox.com>
377 Added note about format incompatibilities with old versions
378 (i.e. pre 0.5@9 formats, which cannot be understood as there
379 was no versionning information in the file by then).
381 Protect all $@ variables when eval {} used, to avoid corrupting
382 it when store/retrieve is called within an exception handler.
384 Mistakenly included "patchlevel.h" instead of <patchlevel.h>,
385 preventing Perl's patchlevel from being included, which is
386 needed starting from 5.6.
388 Tue May 12 09:15:15 METDST 1998 Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
390 Fixed shared "undef" bug in hashes, which did not remain shared
391 through store/retrieve.
393 Thu Feb 10 19:48:16 MET 2000 Raphael Manfredi <Raphael_Manfredi@pobox.com>
395 added last_op_in_netorder() predicate
396 documented last_op_in_netorder()
397 added tests for the new last_op_in_netorder() predicate
399 Wed Oct 20 19:07:36 MEST 1999 Raphael Manfredi <Raphael_Manfredi@pobox.com>
401 Forgot to update VERSION
403 Tue Oct 19 21:25:02 MEST 1999 Raphael Manfredi <Raphael_Manfredi@pobox.com>
405 Added mention of japanese translation for the manual page.
407 Fixed typo in macro that made threaded code not compilable,
408 especially on Win32 platforms.
410 Changed detection of older perls (pre-5.005) by testing PATCHLEVEL
411 directly instead of relying on internal symbols.
413 Tue Sep 14 22:13:28 MEST 1999 Raphael Manfredi <Raphael_Manfredi@pobox.com>
415 Integrated "thread-safe" patch from Murray Nesbitt.
416 Note that this may not be very efficient for threaded code,
417 see comment in the code.
419 Try to avoid compilation warning on 64-bit CPUs. Can't test it,
420 since I don't have access to such machines.
422 Mon Jul 12 14:37:19 METDST 1999 Raphael Manfredi <Raphael_Manfredi@pobox.com>
424 changed my e-mail to pobox.
426 mentionned it is not thread-safe.
428 updated version number.
430 uses new internal PL_* naming convention.
432 Fri Jul 3 13:38:16 METDST 1998 Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
434 Updated benchmark figures due to recent optimizations done in
435 store(): tagnums are now stored as-is in the hash table, so
436 no surrounding SV is created. And the "shared keys" mode for
437 hash table was turned off.
439 Fixed backward compatibility (wrt 0.5@9) for retrieval of
440 blessed refs. That old version did something wrong, but the
441 bugfix prevented correct retrieval of the old format.
443 Mon Jun 22 11:00:48 METDST 1998 Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
445 Changed benchmark figures.
447 Adjust refcnt of tied objects after calling sv_magic() to avoid
448 memory leaks. Contributed by Jeff Gresham.
450 Fri Jun 12 11:50:04 METDST 1998 Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
452 Added workaround for persistent LVALUE-ness in perl5.004. All
453 scalars tagged as being an lvalue are handled as if they were
454 not an lvalue at all. Added test for that LVALUE bug workaround.
456 Now handles Perl immortal scalars explicitely, by storing &sv_yes
457 as such, explicitely.
459 Retrieval of non-immortal undef cannot be shared. Previous
460 version was over-optimizing by not creating a separate SV for
461 all undefined scalars seen.
463 Thu Jun 4 17:21:51 METDST 1998 Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
465 Baseline for Storable-0.6@0.
467 This version introduces a binary incompatibility in the generated
468 binary image, which is more compact than older ones by approximatively
469 15%, depending on the exact degree of sharing in your structures.
471 The good news is that your older images can still be retrieved with
472 this version, i.e. backward compatibility is preserved. This version
473 of Storable can only generate new binaries however.
475 Another good news is that the retrieval of data structure is
476 significantly quicker than before, because a Perl array is used
477 instead of a hash table to keep track of retrieved objects, and
478 also because the image being smaller, less I/O function calls are
481 Tue May 12 09:15:15 METDST 1998 Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
483 Version number now got from Storable.pm directly.
485 Fixed overzealous sv_type() optimization, which would make
486 Storable fail when faced with an "upgraded" SV to the PVIV
487 or PVNV kind containing a reference.
489 Thu Apr 30 15:11:30 METDST 1998 Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
491 Extended the SYNOPSIS section to give quick overview of the
492 routines and their signature.
494 Optimized sv_type() to avoid flags checking when not needed, i.e.
495 when their type makes it impossible for them to be refs or tied.
496 This slightly increases throughput by a few percents when refs
497 and tied variables are marginal occurrences in your data.
499 Stubs for XS now use OutputStream and InputStream file types to
500 make it work when the given file is actually a socket. Perl
501 makes a distinction for sockets in its internal I/O structures
502 by having both a read and a write structure, whereas plain files
505 Tue Jun 3 09:41:33 METDST 1997 Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
507 Thanks to a contribution from Benjamin A. Holzman, Storable is now
508 able to correctly serialize tied SVs, i.e. tied arrays, hashes
511 Thu Apr 9 18:07:51 METDST 1998 Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
513 I said SvPOK() had changed to SvPOKp(), but that was a lie...
515 Wed Apr 8 13:14:29 METDST 1998 Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
517 Wrote sizeof(SV *) instead of sizeof(I32) when portable, which
518 in effect mangled the object tags and prevented portability
519 accross 32/64 bit architectures!
521 Wed Mar 25 14:57:02 MET 1998 Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
523 Added code example for store_fd() and retrieve_fd() in the
524 man page, to emphasize that file descriptors must be passed as
525 globs, not as plain strings.
527 Cannot use SV addresses as tag when using nstore() on LP64. This
528 was the cause of problems when creating a storable image on an
529 LP64 machine and retrieving it on an ILP32 system, which is
530 exactly what nstore() is meant for...
532 However, we continue to use SV addresses as tags for plain store(),
533 because benchamarking shows that it saves up to 8% of the store
534 time, and store() is meant to be fast at the expense of lack
537 This means there will be approximately an 8% degradation of
538 performance for nstore(), but it's now working as expected.
539 That cost may vary on your machine of course, since it is
540 solely caused by the memory allocation overhead used to create
541 unique SV tags for each distinct stored SV.
543 Tue Jan 20 09:21:53 MET 1998 Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
545 Don't use any '_' in version number.
547 Tue Jan 13 17:51:50 MET 1998 Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
549 Updated version number.
551 added binmode() calls for systems where it matters.
553 Be sure to pass globs, not plain file strings, to C routines,
554 so that Storable can be used under the Perl debugger.
556 Wed Nov 5 10:53:22 MET 1997 Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
558 Fix memory leaks on seen hash table and returned SV refs.
560 Storable did not work properly when tainting enabled.
562 Fixed "Allocation too large" messages in freeze/thaw and added.
563 proper regression test in t/freeze.t.
565 Tue Jun 3 09:41:33 METDST 1997 Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
567 Updated version number
569 Added freeze/thaw interface and dclone.
571 Fri May 16 10:45:47 METDST 1997 Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
573 Forgot that AutoLoader does not export its own AUTOLOAD.
576 use AutoLoader 'AUTOLOAD';
578 but that would not be backward compatible. So the export is
581 Tue Mar 25 11:21:32 MET 1997 Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
583 Empty scalar strings are now "defined" at retrieval time.
585 New test to ensure an empty string is defined when retrieved.
587 Thu Feb 27 16:32:44 MET 1997 Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
589 Updated version number
591 Declare VERSION as being used
593 Fixed a typo in the PerlIO_putc remapping.
594 PerlIO_read and perlIO_write inverted size/nb_items.
595 (only relevant for pre-perl5.004 versions)
597 Thu Feb 27 15:58:31 MET 1997 Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
599 Updated version number
601 Added VERSION identification
603 Allow build with perl5.003, which is ante perlIO time
605 Mon Jan 13 17:53:18 MET 1997 Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
609 Wed Jan 22 15:19:56 MET 1997 Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>
611 Updated version number in Makefile.PL.
613 Added "thanks to" section to README.
615 Documented new forgive_me variable.
619 Added forgive_me support to allow store() of data structures
620 containing non-storable items like CODE refs.