On Mon, Sep 18, 2000 at 11:20:15AM -0400, John Porter wrote:
> Seems to me that it would need to be written as
> 
>       $module->UNIVERSAL::require;
> 
> How do you propose to avoid that?

What is a class but a package?  And what is the name of a class but a
package name?  And since there's no concept of an undefined package,
any valid package name is a valid class (I'm sure there are exceptions).

It all works.  Run the prototype code on any module.


> No.  Any reason not to let the error arising from C<eval "require ".ref $obj>
> to do its normal thing?
> 
> The case may be rare, but it should be allowed: UNIVERSAL::require() should
> DTRT given an object ref.

The case is so rare for one having an object *before* loading its
class that most of the time C<$obj->require> will be a programming
mistake.  If C<$obj->require> is made to work, the mistake will become
silent and not be noticed until much futher on down in the code.  

Garbage In, Error Out.

If you really want it, the wrapper require() is trivial.


DTRT?  Data Terminal Ready, Tim?  Document Filing and Retrieval Tedium?

-- 

Michael G Schwern      http://www.pobox.com/~schwern/      [EMAIL PROTECTED]
Just Another Stupid Consultant                      Perl6 Kwalitee Ashuranse
If you only hear one song this year there's something terribly wrong
with you.

Reply via email to