Skip Menu |

This queue is for tickets about the Data-Dump-Streamer CPAN distribution.

Report information
The Basics
Id: 82958
Status: open
Priority: 0/
Queue: Data-Dump-Streamer

People
Owner: Nobody in particular
Requestors: ilmari [...] ilmari.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [PATCH] Fix regexp dumping on perl 5.17.6+
Date: Fri, 25 Jan 2013 20:58:45 +0000
To: bug-Data-Dump-Streamer [...] rt.cpan.org
From: Dagfinn Ilmari Mannsåker <ilmari [...] ilmari.org>
--- lib/Data/Dump/Streamer.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/Data/Dump/Streamer.pm b/lib/Data/Dump/Streamer.pm index a7f16fb..1311eab 100644 --- a/lib/Data/Dump/Streamer.pm +++ b/lib/Data/Dump/Streamer.pm @@ -127,7 +127,7 @@ BEGIN { # As I write this, 5.13.10 doesn't exist so I'm guessing that # we can begin using the ordinary core function again. eval q[ - use re qw(regexp_pattern); + use re qw(regexp_pattern is_regexp); *regex= *regexp_pattern; ] or die $@; } @@ -135,7 +135,7 @@ BEGIN { # Perl-5.13.6 through perl-5.13.9 began returning modifier # flags that weren't yet legal at the time. eval q[ - use re qw(regexp_pattern); + use re qw(regexp_pattern is_regexp); sub regex { if (wantarray) { my ($pat,$mod) = regexp_pattern($_[0]); @@ -153,11 +153,14 @@ BEGIN { } elsif ($]>=5.009004) { eval q[ - use re qw(regexp_pattern); + use re qw(regexp_pattern is_regexp); *regex= *regexp_pattern; 1; ] or die $@; } + else { + eval q[sub is_regexp($) { defined regex($_[0]) }]; + } if ($]<=5.008) { *hidden_keys=sub(\%) { return () }; *legal_keys=sub(\%) { return keys %{$_[0]} }; @@ -2827,7 +2830,7 @@ sub _dump_rv { $idx=$self->{ref}{$addr}; $type=reftype($item); $class=blessed($item); - $class=undef if $class and $class eq 'Regexp' and regex $item; + $class=undef if $class and $class eq 'Regexp' and is_regexp $item; $DEBUG and printf "_dump_rv %d %s %#x\n",$depth,$name,$addr; -- 1.7.10.4
Now that Perl 5.18 is out, could you please make a release with this patch (and the one in https://rt.cpan.org/Public/Bug/Display.html?id=79127) applied? Thanks in advance, ilmari
Subject: Re: [rt.cpan.org #82958] [PATCH] Fix regexp dumping on perl 5.17.6+
Date: Wed, 22 May 2013 08:27:37 +0200
To: "bug-Data-Dump-Streamer [...] rt.cpan.org" <bug-Data-Dump-Streamer [...] rt.cpan.org>
From: demerphq <demerphq [...] gmail.com>
thanks. ill get this as soon as i can. yves On Wednesday, 22 May 2013, Dagfinn Ilmari Mannsaker via RT wrote: Show quoted text
> Queue: Data-Dump-Streamer > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=82958 > > > Now that Perl 5.18 is out, could you please make a release with this patch > (and the one in https://rt.cpan.org/Public/Bug/Display.html?id=79127) > applied? > > Thanks in advance, > > ilmari >
-- perl -Mre=debug -e "/just|another|perl|hacker/"
On Tue May 21 19:52:39 2013, ilmari wrote: Show quoted text
> Now that Perl 5.18 is out, could you please make a release with this > patch (and the one in > https://rt.cpan.org/Public/Bug/Display.html?id=79127) applied?
Should be fixed in v2.36. Yves