Were libxml/xml.rb is simply

require 'libxml'
include LibXML


So this is what is implemented now in libxml.rb:

module XML
  include LibXML::XML
end

Not saying that's the best solution or anything...

Trans's idea would also be fine.

I know I'm late to the discussion, but how about this tweak:

require 'libxml'
unless ['0','false','no','off',false,nil].include? (ENV['RUBY_LIBXML_SHORT_PATH'].nil? ? true : ENV['RUBY_LIBXML_SHORT_PATH'].downcase])
  include LibXML
end

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?

I think a get out of jail free card would be nice and having it conditionalized behind an environment variable is convenient for folks if they're in a jam.

Oh, I see. We could check both - an environmental variable as well as an XML module exists or not.

But in truth, I'm not sure I care enough. In that we've had the XML namespace a long time, so if some library wants to take it from us let them worry about checking for the existence and the XML module defined by LibXML. If it exists, they can nuke it and put in their own. The issue would be load order, if libxml-ruby was loaded afterwards. Thus my idea to check the existence of the XML module.

Charlie

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

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

Reply via email to