David Golden wrote:
On Sun, Mar 14, 2010 at 9:46 AM, David Golden <xda...@gmail.com> wrote:
I've uploaded Metabase-Fact-0.004. Most prerequisites have been
dropped to their last integer version (2.123 -> 2). Core pragmas like
overload have been dropped. I hope that works better.
Metabase-Fact-0.005 drops Encode and relies on core
utf8::encode/decode. rjbs++ for the suggestion.
-- David
Hello,
While helping David beta-test CT2.0 I came across some problems
running it on perl 5.8.X builds. Turns out it was a bizarre issue! I
kept getting this error when trying to send the report:
[ERROR] Could not send 'pass' report for 'DateTime-0.54':
Test::Reporter: error from 'Test::Reporter::Transport::Metabase:'',
Can't use an undefined value as a HASH reference at
/home/cpan/perls/perl-5.8.6-default/lib/site_perl/5.8.6/Metabase/Resource/cpan/distfile.pm
line 63.
At first I naturally blamed my smoking setup, as I knew it had some
bugs in it. After trying to investigate what was wrong on my side I gave
up because I couldn't find anything that would cause the bug. I decided
to look at the code, which is always a good idea, ha! Turns out line 63 is:
my $cache->{dist_file} = $string;
When I tried to narrow it down to a testcase, the problem
immediately became obvious. Running the testcase against my perl builds
revealed that perl > 5.10.0 ran it fine, while all older perls ( 5.8.X
and 5.6.X ) didn't like it. Thanks to the intrepid folks in #p5p on IRC,
we've managed to track it down to an unintentional "feature" added in
perl-5.10.0!
<+p5changes> Commit #a62b51b8(/Shinya Hayakawa): Re: my $x->{foo}
doesn't work http://perl5.git.perl.org/perl.git/commit/a62b51b8
The fix is real simple - just rewrite that line as "my $cache = {
dist_file => $string };" When David came back online, he immediately
jumped on this and released a new version - Metabase-Fact-0.006. It
should be on your favorite CPAN mirror soon. Please make sure you're
using that version when trying to test CT2.0!
Again, big props to David for his hard work! He went straight to
bed, and asked me to make this announcement for him. CT2.0 is now one
less bug towards being production-ready :)
P.S. I'm also filing a perlbug report for this as it seems to be an
undocumented feature. If you're using that syntax in your code - you
better be using perl 5.10.0 or above!
~Apocalypse