develooper Front page | perl.perl5.porters | Postings from March 2007

RE: AutoLoader inheritance patch

Thread Previous | Thread Next
March 20, 2007 05:33
RE: AutoLoader inheritance patch
Message ID:
Dear all,

mea culpa - sorry for all the trouble; yes, I screwed up the
example and forgot to put the package declarations in.
So yes, AutoLoader works fine, if one gives it fine input ;-)
Forget about the patch - it would be required if there
was no autosplit.ix file at all, but that's not the use
model of AutoLoader and I am not suggesting to change it

Sorry for wasting your time and thank you for your
valuable input!



-----Original Message-----
From: Graham Barr [] 
Sent: Tuesday, March 20, 2007 12:32 PM
To: Rouchal Marek (IFAG COM BTS DF R2G)
Subject: Re: AutoLoader inheritance patch

On Mar 20, 2007, at 3:22 AM, <> wrote:

> In reply to Graham's message: yes, it seems that it works OK in this
> use model; but when testing this in a pure deployment environment,
> the current (i.e., perl-5.8.8) AutoLoader does not seem to handle
> inheritance properly.

AutoLoader itself does nothing with inheritance, and it should not  
need to. The stubs in the .ix files are found during method lookup.

> Please unpack the attached tar to an empty
> directory, and run:

What was used to create these .ix files ?

The problem is that the .ix files have the package statements  
missing, so the stubs they define are not placed in the right package.

If you apply my attached patch then it works fine.


>  <<alfail.tar.gz>>
> $ <your-perl-interpreter> ./
> In B_static
> In A_static
> In B_dynamic
> Can't locate auto/BB/ in @INC (@INC contains: .
> /opt/perl_5.8.8/lib) at ./auto/BB/ line 8
> As far as I can tell, the AutoLoader does not search the base classes.
> Please correct me, if the deployment structure (the contents of the
> tar) are wrong - but this is what I see e.g. in Tk.
> $ tar tzf ~/tmp/alfail.tar.gz
> ./
> ./
> ./
> ./
> ./auto/
> ./auto/A/
> ./auto/A/autosplit.ix
> ./auto/A/
> ./auto/BB/
> ./auto/BB/autosplit.ix
> ./auto/BB/
> -Marek
> <alfail.tar.gz>

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About