well, thanks to the folks at CPANPLUS, I now know that the test suite for Acme::No
fails miserably under 5.6 and 5.6.1. (funny, I actually had use 5.008
in there until someone wanting to use it with 5.6 asked me to change it. "sure, it only uses our()
- that should be fine." that'll learn me).
anyway, it turns out that there is some funky interaction between Carp::croak
and Filter::Util::Call
that rears its head when a file is included using do foo.pl
or eval {require "foo.pl"}
for instance, given source filter
package Bug;
use Carp qw(croak);
use Filter::Util::Call;
sub import {
filter_add(sub {
my $status = 0;
if (($status = filter_read) > 0) {
croak "whoops";
}
return $status;
});
}
1;
and script
use Bug;
1;
here are some outputs with 5.6.1
$ /usr/bin/perl-5.6.1 bug.pl
whoops at bug.pl line 1
that's what we want. however
$ /usr/bin/perl-5.6.1 -e'do "bug.pl"'
Segmentation fault (core dumped)
$ /usr/bin/perl-5.6.1 -e'eval {require "bug.pl"}'
Segmentation fault (core dumped)
hmm... the reason I was using do
at all was to write the tests for the module, as I figured it was an easy way to include a generated file while using Test::*
.
I am spending way too much time on this silly module...