At 05:27 PM 5/29/2001 +0200, Issac Goldstand wrote:
>
>> My $0.02 on XML config files. Although they may be attractive to some,
>> personally, I don't like them.
>>
>> I see XML is merely the expression of the configurable parameters of the
>> object. IE it is just a means to the end. Personally, I would like to
>define
>> my widget properties through a GUI and then will probably use Storable to
>> dehydrate and rehydrate my widget objects. I would never want to code up
>XML
>> data and I don't think I'm alone. :)
>>
>> Definately when it comes to interchanging your widget data with another
>> system something like XML really starts to make sense. I don't think it
>> makes sense necessarily for your internal day-to-day operations.
>>
>> What I would advocate is that there are a variety of sources for widget
>> configuration data from something as simple and elegant as Perl code to
>XML
>> of some layout to Storable data stored in a blob field of a DBI source.
>
>Actually, I personally think that you're both correct here - I think the
>proper way to stash the widgets would be through Storable.  If you wish to
>do it through XML, then that should call for an extension to Storable which
>can store/retrieve data from XML.
>
>  Issac

I completely understand what all three of you are saying, and I think the
needs of the Gunther and Jay are being accommodated in the new design.

However, a note on XML and Storable ...

The XML::Simple class allows you a "cache" option (which I am using)
where it caches the perl data structure in a Storable.
The XML::Simple class reads the XML file into a perl data structure,
then stores it as a Storable.  On subsequent reads, it checks the
timestamps of the .xml file and the .stor file and only rereads the
XML file if it is newer than the .stor file.  Otherwise, it just
reads the .stor file.  This appears to be about 3x faster.

It would be kind of interesting if the Storable class were extended
to store as XML ...  ;-)

Stephen


Reply via email to