Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
openSUSE:13.1:Update
perl-Data-Dump-Streamer
rt_82958.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File rt_82958.diff of Package perl-Data-Dump-Streamer
From ilmari@ilmari.org Fri Jan 25 15:59:04 2013 X-Spam-Status: No, score=-6.9 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5] autolearn=ham X-Mailer: git-send-email 1.7.10.4 X-Spam-Flag: NO Message-ID: <1359147525-31283-1-git-send-email-ilmari@ilmari.org> X-Virus-Scanned: Debian amavisd-new at bestpractical.com X-Spam-Score: -6.9 Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 28C362404D0 for <cpan-bug+Data-Dump-Streamer@hipster.bestpractical.com>; Fri, 25 Jan 2013 15:59:04 -0500 (EST) Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JyLC+XFcuR1P for <cpan-bug+Data-Dump-Streamer@hipster.bestpractical.com>; Fri, 25 Jan 2013 15:59:02 -0500 (EST) Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 51ED72404C2 for <bug-Data-Dump-Streamer@rt.cpan.org>; Fri, 25 Jan 2013 15:59:02 -0500 (EST) Received: (qmail 16400 invoked by uid 103); 25 Jan 2013 20:59:01 -0000 Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 25 Jan 2013 20:59:01 -0000 Received: from vuizook.err.no (HELO vuizook.err.no) (62.73.197.98) by 16.mx.develooper.com (qpsmtpd/0.84/v0.84-167-g4ed6cab) with ESMTP; Fri, 25 Jan 2013 12:58:58 -0800 Received: from host109-153-125-202.range109-153.btcentralplus.com ([109.153.125.202] helo=nurket) by vuizook.err.no with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from <ilmari@ilmari.org>) id 1TyqMM-0006y3-Vv for bug-Data-Dump-Streamer@rt.cpan.org; Fri, 25 Jan 2013 21:58:51 +0100 Received: by nurket (Postfix, from userid 1000) id 65E3F205C6; Fri, 25 Jan 2013 20:58:45 +0000 (GMT) Delivered-To: cpan-bug+Data-Dump-Streamer@hipster.bestpractical.com Subject: [PATCH] Fix regexp dumping on perl 5.17.6+ Return-Path: <ilmari@ilmari.org> X-RT-Mail-Extension: data-dump-streamer X-Original-To: cpan-bug+Data-Dump-Streamer@hipster.bestpractical.com X-Spam-Check-BY: 16.mx.develooper.com X-Old-Spam-Status: (score 5.9): Yes, score=5.9 required=5.0 tests=FSL_HELO_NON_FQDN_1,HELO_NO_DOMAIN,RCVD_IN_PBL,RCVD_IN_SORBS_DUL,RDNS_DYNAMIC,TO_NO_BRKTS_DYNIP autolearn=disabled version=3.3.1 Date: Fri, 25 Jan 2013 20:58:45 +0000 X-Spam-Level: To: bug-Data-Dump-Streamer@rt.cpan.org From: Dagfinn Ilmari Manns?ker <ilmari@ilmari.org> X-RT-Original-Encoding: ascii content-type: text/plain; charset="utf-8" Content-Length: 1809 --- 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
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor