Skip Menu |

This queue is for tickets about the as CPAN distribution.

Report information
The Basics
Id: 28838
Status: resolved
Priority: 0/
Queue: as

People
Owner: Nobody in particular
Requestors: hooo [...] cpan.org
Cc:
AdminCc:

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



Subject: Memory Leak
There is a memory leak in 'as'. Unloading as does not remove the module entry in the hash table used in 'as'. Cheers Ho
On Di. 14. Aug. 2007, 17:32:59, HOOO wrote: Show quoted text
> There is a memory leak in 'as'. > Unloading as does not remove the module entry in the hash table used in > 'as'. > > Cheers > Ho
I have noticed that 'as' is the same as Package::Alias or is there a difference?
On Di. 14. Aug. 2007, 17:42:36, HOOO wrote: Show quoted text
> On Di. 14. Aug. 2007, 17:32:59, HOOO wrote:
> > There is a memory leak in 'as'. > > Unloading as does not remove the module entry in the hash table used in > > 'as'. > > > > Cheers > > Ho
> > > I have noticed that 'as' is the same as Package::Alias or is there a > difference?
Why are you using a top level namespace?
From: ELIZABETH [...] cpan.org
On Tue Aug 14 17:32:59 2007, HOOO wrote: Show quoted text
> There is a memory leak in 'as'. > Unloading as does not remove the module entry in the hash table used in > 'as'.
Please provide me with code to illustrate what you mean with "Unloading as". Liz
On Tue Aug 14 17:42:36 2007, HOOO wrote: Show quoted text
> On Di. 14. Aug. 2007, 17:32:59, HOOO wrote:
> > There is a memory leak in 'as'. > > Unloading as does not remove the module entry in the hash table used in > > 'as'. > > > > Cheers > > Ho
> > > I have noticed that 'as' is the same as Package::Alias or is there a > difference?
This difference is in the way you specify the namespace aliases: the basic functionality is the same. Liz
On Tue Aug 14 17:43:24 2007, HOOO wrote: Show quoted text
> On Di. 14. Aug. 2007, 17:42:36, HOOO wrote:
> > On Di. 14. Aug. 2007, 17:32:59, HOOO wrote:
> > > There is a memory leak in 'as'. > > > Unloading as does not remove the module entry in the hash table used in > > > 'as'. > > > > > > Cheers > > > Ho
> > > > > > I have noticed that 'as' is the same as Package::Alias or is there a > > difference? > >
> Why are you using a top level namespace?
Why not? Seems to me that something like this should belong in the core. So why not start with a pragma? Liz
From: HOOO [...] cpan.org
On Di. 14. Aug. 2007, 17:32:59, HOOO wrote: Show quoted text
> There is a memory leak in 'as'. > Unloading as does not remove the module entry in the hash table used in > 'as'. > > Cheers > Ho
I beg your pardon, there is no memory leak. I tested it with: package main; use as; eval " use Tie::Scalar as => TieScalar$_; use TieScalar$_ as => TieScalarXXX$_; no TieScalar$_; no TieScalarXXX$_; " foreach 1..1000000000; __END__ Looking in the documentation, 'as' is designed to use in the package where the 'use' statement occures, to directly renaming a module name while importing. In difference to 'Package::Alias' which can be used in the package itself so the package can provide an alias. Thought i could write: package Very::Long::Package::Name; use as 'Bah'; This would be easier to read than: package Very::Long::Package::Name; use Package::Alias 'Bah' => __PACKAGE__; What do you think about this syntax? Cheers Ho.
I'm pretty sue this is resolved now