Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

perl5i + Data::Dumper::Simple #181

Closed
schwern opened this Issue Feb 24, 2011 · 3 comments

Comments

Projects
None yet
2 participants
Contributor

schwern commented Feb 24, 2011

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.

Contributor

schwern commented Feb 24, 2011

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

I added a note.

@notbenh notbenh pushed a commit to notbenh/perl5i that referenced this issue Mar 21, 2013

ben hengst attempting to see if #181 is still an issue 0348deb
Contributor

notbenh commented Mar 21, 2013

This appears to be resolved: notbenh/perl5i@0348deb

Contributor

schwern commented Mar 22, 2013

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 in 1b876c7 Mar 22, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment