Subject: | 0.55 seems to have trouble with impliicit $_ in a for() modifier? |
Hello,
I'm using D::C 0.55 on perl 5.8.6 and I'm encountering a bit of trouble with the test suite for Regexp::Assemble.
Previous versions of D::C had no trouble with lines like
my @list = qw/ den dent din dint ten tent tin tint /;
my $ra = Regexp::Assemble->new;
$ra->insert( split // ) for @list;
I haven't had time to cut this down to a smaller test case. Either this makes immediate sense to you and there's no point, or else it's a head-scratcher. If it's the latter, just holler and I'll try and cut it down.
The symptoms are that the insert() method should be receiving an array, and yet it gets nothing. Changing the above code to
my @list = qw/ den dent din dint ten tent tin tint /;
my $ra = Regexp::Assemble->new;
for my $l (@list) { $ra->insert( split //, $l ) }
... makes the test suite work correctly, so I've gone ahead and used that construct isstead. Which is probably the Right Thing To Do, anyway. But I wanted to record it here for its curiousity value.
Thanks,
David