On Jul 16, 5:41 pm, Sean Chittenden <[EMAIL PROTECTED]> wrote:
> > So what's the RUBY_LIBXML_SHORT_PATH bit?  Couldn't we just check  
> > and see if a XML module has already been loaded, and if so, not load  
> > ours?
>
> It's an environment variable that determines whether or not the  
> library shouldn't include LibXML automatically.  I'd argue that in 99%  
> of the cases, it should.  The remaining 1% of the time, they can set  
> this global variable and go.  -sc

Well it depends on whether you are writing an application or just some
personally useful scripts. For an app it needs to be the opposite b/c
then you will have your own namespace, and in that you would 'include
LibXML'. If you are just writing some admin scripts or what not, then
of course you don't care about resuse and you can include it at the
toplevel. It's important that the basic case be NOT to include, b/c
that is the most reusable case and it is what one is asking for, ie.
require 'libxml' provides LibXML. One can always do the include. But I
understand that it can be a pain to have to type 'include LibXML' when
you want it at the toplevel. That's why I suggested a second require
'libxml/xml' which seems fitting since that is what you are asking for
too, LibXML::XML.

I have nothing against the environment variable per say, but keep in
mind if one script expects it to be set to "yes" and another does not,
then they may not work together.

T.
_______________________________________________
libxml-devel mailing list
libxml-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/libxml-devel

Reply via email to