[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-p-dev
Subject:    Re: INIT block in XML::Xerces
From:       jason () openinformatics ! com (Jason E !  Stewart)
Date:       2005-01-13 16:45:18
Message-ID: 87brbtl25t.fsf () openinformatics ! com
[Download RAW message or body]

"Colin Robertson" <Colin.Robertson@bbc.co.uk> writes:

> I'm working on a module which is intended to be loaded dynamically using
> an eval. That module then uses XML::Xerces. However, when it gets loaded
> it prints out the error message "Too late to run INIT block at
> /usr/local/cps_perl5.6.1/site_perl/sun4-solaris/XML/Xerces.pm line 17."
>
> As a workaround, I'm running XML::Xerces::XMLPlatformUtils::Initialize()
> after loading XML::Xerces, so that at least that code gets run. That's
> not very safe though, since the contents of the INIT block could change
> in the future. Also the user still sees the error message when they use
> my module.
>
> Would it be possible for XML::Xerces to call the Initialize routine in a
> way that would be friendlier to dynamic loading?

Hi Colin,

This INIT block has bothered me as well. I put it in Xerces so that
initialization would be run automagically for Perl users. I suppose, I
could put it in a BEGIN block, but I haven't tested it. If you would
like to test that idea or provide others, I will be happy to
incorporate them into the next release of Xerces.

Cheers,
jas.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic