Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the AutoLoader CPAN distribution.

Report information
The Basics
Id: 31069
Status: resolved
Priority: 0/
Queue: AutoLoader

Owner: Nobody in particular
Requestors: l2ot9pa02 [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

CC: perl5-porters [...], bug-AutoLoader [...]
Subject: Re: AutoLoader slowness in "can"
Date: Thu, 29 Nov 2007 14:05:46 +0100
To: Graham Barr <gbarr [...]>
From: Steffen Mueller <l2ot9pa02 [...]>
Download (untitled) / with headers
text/plain 1.2k
Hi Graham, hi p5p, Graham Barr wrote: Show quoted text
> I do not see the point of AutoLoader::can > > A module that uses the AutoLoader package should be installed using the > AutoSplit package. The result will be that sub stubs will be created for > every method/sub that is to be AUTOLOADed. This will cause the default > ->can method in UNIVERSAL to return a reference to the sub stub. When > the method is called it will get loaded. > > AutoLoader::can does call SUPER::can first and return if that is true, > so the code in AutoLoader::can will only ever do its checking if the > package that is using AutoLoader was not installed correctly with > AutoSplit or the method being requested does not exist. >
>> The root of the problem is that the "require" in AutoLoader::can is >> called every time. A possible fix is to fake %INC so that require is >> called only once. See the attached patch.
> > IMO, AutoLoader::can should just be removed all together.
Along with all tests that assume AutoLoader::can works without a sub stub? Just to make sure: Do I understand you correctly in that you are saying AutoLoader should not try to work if there are no sub stubs in the user code (generated by AutoSplit or by hand)? I would assume that this breaks quite some code, no? Best regards, Steffen
Finally, this bug should be fixed by AutoLoader 5.65. can is now history.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to