Johannes Ernst am Donnerstag, 23. Februar 2006 00.19:
> [Blogged about it here: http://netmesh.info/jernst/Technical/perl-
> inheritance-problem.html ]
>
> There are three very simple classes in the following code: C is a
> subclass of B, which is a subclass of A.
>
> If I try to instantiate B (see last two lines of the code below), I'm
> getting this output:
>
>      Point B: Exporter
>      Can't locate object method "new" via package "B" at madness.pl
> line 23.
>
> However, if I comment out class C (which isn't even instantiated by
> my code!) it works!
>
> It also works if I rename class B to Z, for example. And where in the
> world would class Exporter suddenly come from? (see debugging output
> of the @ISA)
[...]

B is a core compiler module... this also explains where the Exporter in @ISA 
is coming from, since B 'isa' Exporter.

It seems that - see to the order of paths in your @INC - the core B is loaded 
and not your B.

Sorry, I did not delve deeper in your code.

hth
Hans 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to