Skip Menu |
 

This queue is for tickets about the Scalar-List-Utils CPAN distribution.

Report information
The Basics
Id: 65629
Status: rejected
Priority: 0/
Queue: Scalar-List-Utils

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

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



Subject: Failure to properly lexicalize $a and $b in pairwise, reduce
Download (untitled) / with headers
text/plain 274b
Using $a and $b in pairwise() or reduce() generates "Name "main::a" used only once possible typo" warnings. This article describes the issue in more detail: http://stackoverflow.com/questions/1490505/how-do-i-prevent-listmoreutils-from-warning-about-using-a-and-b-only-once
Download (untitled) / with headers
text/plain 276b
This is not something that can be fixed in the List::Util module perl itself gets around this with sort because it does exceptions in the lexer. this is not something that ordinary modules have access to. The user of reduce should use our($a,$b) to silence these warnings
Subject: Re: [rt.cpan.org #65629] Failure to properly lexicalize $a and $b in pairwise, reduce
Date: Thu, 10 Feb 2011 14:16:19 -0800
To: Graham_Barr via RT <bug-Scalar-List-Utils [...] rt.cpan.org>
From: Karen Etheridge <ether [...] cpan.org>
Download (untitled) / with headers
text/plain 563b
Hmm ok. I suppose this is why other modules that simulate sort() or other methods use $_[0] and $_[1] in their subs rather than $a, $b. :) On Thu, Feb 10, 2011 at 04:54:33PM -0500, Graham_Barr via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=65629 > > > This is not something that can be fixed in the List::Util module > > > perl itself gets around this with sort because it does exceptions in the lexer. this is not > something that ordinary modules have access to. > > The user of reduce should use our($a,$b) to silence these warnings
Ether, you should be able to re-close this bug (it got auto-opened)


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.