Subject: | Fw: Test::Differences spurious warning |
Date: | Tue, 13 Oct 2009 07:32:05 -0700 (PDT) |
To: | bug-test-differences [...] rt.cpan.org |
From: | Ovid <curtis_ovid_poe [...] yahoo.com> |
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog - http://use.perl.org/~Ovid/journal/
Twitter - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6
Subject: | Test::Differences spurious warning |
Date: | Tue, 13 Oct 2009 16:00:31 +0200 |
To: | ovid [...] cpan.org |
From: | Xavier Caron <xavier.caron [...] atmel.com> |
Hi,
I have a weird use case for which a function returns a HoL for valid input
stuff or undef. When I use eq_or_diff I have the following (IMHO spurious)
warning:
Use of uninitialized value $_ in split at
/local/users/flow/PERL/perl-5.10.1/lib/site_perl/5.10.1/Test/Differences.pm line 252.
I'm using Perl v5.11.0 on a RHEL52 box.
I've fixed the _flatten sub the quick'n'dirty way:
return [ ] unless defined; # XC patch
return [ split /^/m ] unless ref;
Altered code still pass the test suite.
HTH.
Cheers,
X.