FreezeThaw

FreezeThaw is a Perl module for converting Perl structures to strings and back.
Download

FreezeThaw Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • FreezeThaw team
  • Publisher web site:
  • http://search.cpan.org/~ilyaz/FreezeThaw-0.43/FreezeThaw.pm

FreezeThaw Tags


FreezeThaw Description

FreezeThaw is a Perl module for converting Perl structures to strings and back. FreezeThaw is a Perl module for converting Perl structures to strings and back.SYNOPSIS use FreezeThaw qw(freeze thaw cmpStr safeFreeze cmpStrHard); $string = freeze $data1, $data2, $data3; ... ($olddata1, $olddata2, $olddata3) = thaw $string; if (cmpStr($olddata2,$data2) == 0) {print "OK!"}Converts data to/from stringified form, appropriate for saving-to/reading-from permanent storage.Deals with objects, circular lists, repeated appearence of the same refence. Does not deal with overloaded stringify operator yet.EXPORTExportablefreeze thaw cmpStr cmpStrHard safeFreeze.User APIcmpStranalogue of cmp for data. Takes two arguments and compares them as separate entities.cmpStrHardanalogue of cmp for data. Takes two arguments and compares them considered as a group.freezereturns a string that encupsulates its arguments (considered as a group). thawing this string leads to a fatal error if arguments to freeze contained references to GLOBs and CODEs.safeFreezereturns a string that encupsulates its arguments (considered as a group). The result is thawable in the same process. thawing the result in a different process should result in a fatal error if arguments to safeFreeze contained references to GLOBs and CODEs.thawtakes one string argument and returns an array. The elements of the array are "equivalent" to arguments of the freeze command that created the string. Can result in a fatal error (see above).Limitations:A lot of objects are blessed in some obscure packages by XSUB typemaps. It is not clear how to (automatically) prevent the UNIVERSAL methods to be called for objects in these packages.The objects which can survive freeze()/thaw() cycle must also survive a change of a "member" to an equal member. Say, after$a = ;$a->{b} = $a->{a};$a satisfies$a->{b} == $a->{a}This property will be broken by freeze()/thaw(), but it is also broken by$a->{a} = delete $a->{a}; Requirements: · Perl


FreezeThaw Related Software