On Friday 08 February 2002 04:27, Matt Sergeant wrote: > On Fri, 8 Feb 2002, Gregory Belenky wrote: > > | >God that's a toughie... I don't really know the answer, except maybe > > | > to check something like module->can('new') before trying to load it. > > | > > | Could it be a hard-to-find spelling error somewhere in the 'package', > > > > 'use', or configuration directives ? Smth like case error ? Bizzare > > results are often produced by such errors and they are extremely hard to > > fix. > > > > > > No. When I split module by packages - everything's fine. > > Just split and place in @INC dir-tree. No source changes. > > I guess the right way to handle this is to not fail at load time, but to > leave Perl to just fail at runtime when it tries to call a method in that > class. Error reporting might be a little tougher, but it's probably the > right thing to do.
Actually, I disagree. That could potentially cause very hard to locate problems that would only crop up in very obscure circumstances. For instance consider some AUTOLOADED function that someone uses very rarely. Some modules, like Date::Manip for instance, have 100's of obscure functions that may only get invoked internally when they encounter certain types of input. Personally I would rather have my application not load at all, so I know to fix things, than to have some user 3 months from now reporting errors. Its analogous to the rule of always doing a "use strict", best to catch problems ASAP. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]