On Thu, 8 Nov 2001, Perrin Harkins wrote:

> > my only concrete reason for preferring xml, other than that
> > it "feels" right ;), is that you get much better error
> > handling right out of the box, especially when you turn on
> > validation. that's something that would have to be
> > implemented as part of a perl-based config file processor.
>
> Can't you just do something like a require() wrapped in an eval{}?
>
> I'm not against an XML config, although I've always been happy with perl
> config files in the past.  (I still want to see the layered config idea that
> was discussed earlier.)  It may be that a CGI implementation would need to
> cache the data with Storable and stat the XML files to see if they've
> changed.

One thing to bear in mind is the size of an XML parser. XML::SAX::PurePerl
is running at about 2500 lines of code at the moment, which could be seen
as pretty heavyweight for a core component. Then again, it could be
considerably smaller than, say, a fully fledged mail API.

We may wish to consider either simple INI files (which is what I'm using
to bootstrap XML::SAX, see the perl-xml list for details), or something
like Ingy's XML-come-Data-Dumper-come-Python config files. I forget what
it's called right now (MinML?).

But having said that, I agree with the validation thing - but there aren't
many validating XML parsers in perl.

-- 
<Matt/>

    /||    ** Founder and CTO  **  **   http://axkit.com/     **
   //||    **  AxKit.com Ltd   **  ** XML Application Serving **
  // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
     \\//
     //\\
    //  \\

Reply via email to