Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

geoff (2013)

geoff
  reversethis-{gro ... om} {ta} {ffoeg}
http://www.modperlcookbook.org/

see http://www.modperlcookbook.org/~geoff/ [modperlcookbook.org] for personal information, links to presentations, GPG key, and so on.

Journal of geoff (2013)

Thursday August 15, 2002
08:35 AM

ETOOMUCHTIME

[ #7107 ]
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...
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.