Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Persistence for options?

by mirod (Canon)
on Aug 15, 2001 at 19:43 UTC ( #105071=note: print w/replies, xml ) Need Help??

in reply to Persistence for options?

Hey, nice can of worms you opened here toma!

So here is a summary of what we've got so far. Let me know if you feel like adding more module/options or other fields:

Module Format In core Notes
Storable binary X fast
Data::Dumper text X widely used, need to eval the output to reload it
Data::Denter text   plug-in replacement for Data::Dumper
XML::Simple XML    
Data::DumpXML XML   more complete than XML::Dumper
XML::Dumper XML   simpler than Data::DumpXML
hash tied to a DB_File binary X  
AnyData various   can use CSV, XML, .INI...
DBD::AnyData various   same as AnyData with a DBI interface
Tk::Style XML   not on CPAN, for TK stylesheets
AppConfig text   configuration files can be overridden by command line arguments
Config::IniFiles text   MS-Windows style .ini files
Inifile text   MS-Windows style .ini files
Boulder text, XML   boulder format, plus various bio*-related formats

Update: added Boulder as suggested below.

Replies are listed 'Best First'.
Re: Re: Persistence for options?
by miyagawa (Chaplain) on Aug 15, 2001 at 21:09 UTC
    Nice comparison! And yeah, why not add Boulder by Lincoln Stein.

    Update: Boulder is a data format used internally in's query persistence. Here's an excerpt from perldoc CGI.

    =head2 SAVING THE STATE OF THE SCRIPT TO A FILE: $query->save(FILEHANDLE) This will write the current state of the form to the provided filehandle. You can read it back in by providing a filehandle to the new() method. Note that the filehandle can be a file, a pipe, or whatever! The file format used for save/restore is identical to that used by the Whitehead Genome Center's data exchange format "Boulderio", and can be manipulated and even databased using Boulderio utilities. See for further details.
    Tatsuhiko Miyagawa
Re: Persistence for options?
by simonm (Vicar) on Aug 15, 2001 at 22:55 UTC

    FWIW, I posted Data::PropertyList to CPAN a couple of years ago, which supports the "property list" format for configuration data originally used by NeXT.

    It's a text format with support for nested data structures, designed to be human-editable, and does not use evals, which puts it somewhere between Data::Denter and Inifile in terms of flexibility.

    Apple has switched to using an XML encoding for these data structures in MacOS X, so this file format is probably only of historical interest at this point...

      Actually, WindowMaker uses the property list format for it's menus and other files.
Re: Re: Persistence for options?
by meonkeys (Chaplain) on Aug 16, 2001 at 01:31 UTC
    Parse::RecDescent is quite capable of reading any kind of configuration file. In fact, you could write a configuration file manager, using other modules to write the config files. That might be cool. And slow.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://105071]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2022-12-05 10:13 GMT
Find Nodes?
    Voting Booth?

    No recent polls found