On Sun, Jun 26, 2005 at 09:38:47PM -0700, chromatic wrote: > > Please observe the dire warning layed out in my sig below. > > > > DynaLoader is documented as needing to be inherited from. You screw with > > that you flirt with breakage just to avoid writing one line of code. > > Most of its documentation suggests using a standard function call, not > to mention the usage error seven lines in. If it really needs > inheritance and a method call, it needs a documentation patch (and > hopefully one that avoids the blepharitic indirect object syntax).
Yes, much of the DynaLoader documentation is confused. DynaLoader exports no functions yet the documentation suggests that it does. XSLoader gets around this madness by working largely in package DynaLoader. The use of indirect object syntax is definately to blame here. bootstrap() is a method, not a function. And then there's the OO / not-OO confusion. Some of DynaLoaders routines are functions (dl_find_symbol(), for example) and some are methods (dl_load_flags()). To add to the confusion the methods are often hidden as indirect object calls. Nice and inconsistent and confusing. Its like whoever wrote DynaLoader was trying to hide its OO nature. Given the general dislike of OO at the time of DynaLoader's inception I'm not surprised. I'd take a stab at fixing the docs but I'm not an XS author so I'm afraid I'd get things wrong. Fixing the documentation is one thing. Fixing the interface... ugg. Might do more harm than good to try that. Which is why I'm pushing getting XSLoader onto CPAN. 99% of the DynaLoader interface is not needed by 99% of XS module authors. -- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern You are wicked and wrong to have broken inside and peeked at the implementation and then relied upon it. -- tchrist in <[EMAIL PROTECTED]>