Subject: | ::Module->fetch clobbers $_ |
Date: | Sat, 26 Jan 2008 22:10:46 -0500 |
To: | bug-cpanplus [...] rt.cpan.org |
From: | "Bernie Cosell" <bernie [...] fantasyfarm.com> |
Minor problem, and I'm never sure whether this kind of thing is a bug or
not, but doing a fetch clobbers $_:
I have a little loop that looks like
(the hash is $fetch{PACKAGE} = module object for that package)
foreach (sort keys %fetch)
{ Trace("Fetching $_") ;
my $mod = $fetch{$_} ;
Trace("name is still $_") ;
my $path = $mod->fetch(fetchdir => "/tmp", force => 1) ;
Trace("name is still $_") ;
Fetching YAML
name is still YAML
name is still __END__
The fetch works perfectly I just need to be a bit more careful about not
counting on $_. OTOH, I think that whatever's clobbering $_ ought to
localize it or else you should document that you clobber it.
/Bernie\
--
Bernie Cosell Fantasy Farm Fibers
mailto:bernie@fantasyfarm.com Pearisburg, VA
--> Too many people, too few sheep <--