Skip Menu |

This queue is for tickets about the File-Find-Rule CPAN distribution.

Report information
The Basics
Id: 73251
Status: new
Priority: 0/
Queue: File-Find-Rule

People
Owner: Nobody in particular
Requestors: BRaven [...] nyx.com
Cc:
AdminCc:

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



Subject: Possible bug in File::Find::Rule
Date: Wed, 14 Dec 2011 10:53:42 +0000
To: "'bug-File-Find-Rule [...] rt.cpan.org'" <bug-File-Find-Rule [...] rt.cpan.org>
From: Brian Raven <BRaven [...] nyx.com>
File::Find::Rule version 0.33. I'm not sure if this is a bug, but I was looking at the code, and it seemed to me that the _flatten function wasn't quite right. sub _flatten { my @flat; while (@_) { my $item = shift; ref $item eq 'ARRAY' ? push @_, @{ $item } : push @flat, $item; } return @flat; } Shouldn't that 'push @_, @{ $item }' be 'unshift @_, @{ $item }'. Otherwise you are reordering as well as flattening. If the push is deliberate, it might be worth adding a comment to say why. -- Brian Raven Please consider the environment before printing this e-mail. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.