Skip Menu |
 

This queue is for tickets about the CPANPLUS CPAN distribution.

Report information
The Basics
Id: 32696
Status: stalled
Priority: 0/
Queue: CPANPLUS

People
Owner: Nobody in particular
Requestors: bernie [...] fantasyfarm.com
Cc:
AdminCc:

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



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>
Download (untitled) / with headers
text/plain 870b
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 <--
Download (untitled) / with headers
text/plain 733b
Hi Bernie, On Sat Jan 26 22:11:15 2008, bernie@fantasyfarm.com wrote: Show quoted text
> Minor problem, and I'm never sure whether this kind of thing is a bug or > not, but doing a fetch clobbers $_:
I've kept this ticket in the back of my head over the last few months of development, and found it incredibly hard to squash this issue; you see, ->fetch() doesn't actually use $_, nor does the method IT calls, but it's further down the stack. And this goes for many routines that clobber $_ at *some* point, which makes it a nigh impossible bug to weed out :( If you have a suggestion on how this can be accomplished, I'm all ears, but for now it looks like it's unfixable. Sorry there's no better news at this point, but thanks for reporting!


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.