Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

perl5i + Data::Dumper::Simple #181

Closed
schwern opened this Issue · 3 comments

2 participants

@schwern
Owner

If perl5i is loaded before Data::Dumper::Simple there is a bad reaction deep inside the bowels of toke.c.

use perl5i::2;
use Data::Dumper::Simple;

filter_del can only delete in reverse order (currently) which is coming from inside toke.c

if (!PL_parser || !PL_rsfp_filters || AvFILLp(PL_rsfp_filters)<0)
return;
/* if filter is on top of stack (usual case) just pop it off */
datasv = FILTER_DATA(AvFILLp(PL_rsfp_filters));
if (IoANY(datasv) == FPTR2DPTR(void *, funcp)) {
sv_free(av_pop(PL_rsfp_filters));

    return;
}
/* we need to search for the correct entry and clear it */
Perl_die(aTHX_ "filter_del can only delete in reverse order (currently)");

This appears to be a bad interaction between Devel::Declare and Filter::Simple.

# Foo.pm
package Foo;
use Filter::Simple sub { 1 };

# test.plx
use Method::Signatures;
use Foo;

Same error.

I'll report it to Devel::Declare and Filter::Simple.

@schwern
Owner

It's already been reported.
https://rt.cpan.org/Ticket/Display.html?id=47547

I added a note.

@notbenh notbenh referenced this issue from a commit in notbenh/perl5i
ben hengst attempting to see if #181 is still an issue 0348deb
@notbenh

This appears to be resolved: notbenh@0348deb

@schwern
Owner

I was thinking it would make sense to turn this into a test, but there's no reason to punish non Data::Dumper::Simple users should it fail again. We could make it a developer only test...

But looking at the original bug it looks like to prevent this kind of bug we should depend on the version of Devel::Declare with it fixed. I'll get that.

@schwern schwern closed this issue from a commit
@schwern schwern Upgrade our dependency on Devel::Declare to a safer version.
This avoids a conflict between perl5i and Data::Dumper::Simple and
probably more Devel::Declare modules.

Also filled in the change log for my previous commit.

Fixes #181
1b876c7
@schwern schwern closed this in 1b876c7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.