Skip Menu |
 

This queue is for tickets about the Devel-Cycle CPAN distribution.

Report information
The Basics
Id: 56681
Status: open
Priority: 0/
Queue: Devel-Cycle

People
Owner: Nobody in particular
Requestors: ether [...] cpan.org
wyant [...] cpan.org
Cc:
AdminCc:

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



Subject: Unhandled type: REGEXP at ...Devel/Cycle.pm line 107 under Perl 5.12.0.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1271466110-26540-370"
Content-Length: 0
Content-Type: text/plain; charset="UTF-8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 671
Download (untitled) / with headers
text/plain 671b
Under Perl 5.12.0: $ perl -MDevel::Cycle -e 'my $foo = qr{bar}smx; find_cycle($foo)' Unhandled type: REGEXP at /usr/local/perl/5.12.0/lib/site_perl/5.12.0/Devel/Cycle.pm line 107. This appears to be because regular expressions have become first-class objects under 5.12, so UNIVERSAL::isa($thingy,'SCALAR'), which was true under 5.10 when $thingy contained a reference to a regexp, is false under 5.12. The attached patches against 1.11 restore the 5.10 behavior under 5.12, by having _get_type() return 'SCALAR' when UNIVERSAL::isa($thingy,'Regexp') is true, and test the handling of regexps. The patches test without reporting any errors under both 5.10.1 and 5.12.0
Subject: Devel-Cycle-pm.patch
MIME-Version: 1.0
Content-Type: application/octet-stream; name="Devel-Cycle-pm.patch"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline; filename="Devel-Cycle-pm.patch"
Content-Transfer-Encoding: base64
Content-Length: 586
--- lib/Devel/Cycle.old 2009-08-24 08:54:45.000000000 -0400 +++ lib/Devel/Cycle.pm 2010-04-16 20:53:30.000000000 -0400 @@ -215,7 +215,7 @@ sub _get_type { my $thingy = shift; return unless ref $thingy; - return 'SCALAR' if UNIVERSAL::isa($thingy,'SCALAR') || UNIVERSAL::isa($thingy,'REF'); + return 'SCALAR' if UNIVERSAL::isa($thingy,'SCALAR') || UNIVERSAL::isa($thingy,'REF') || UNIVERSAL::isa($thingy,'Regexp'); return 'ARRAY' if UNIVERSAL::isa($thingy,'ARRAY'); return 'HASH' if UNIVERSAL::isa($thingy,'HASH'); return 'CODE' if UNIVERSAL::isa($thingy,'CODE');
Subject: Devel-Cycle-t.patch
MIME-Version: 1.0
Content-Type: application/octet-stream; name="Devel-Cycle-t.patch"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline; filename="Devel-Cycle-t.patch"
Content-Transfer-Encoding: base64
Content-Length: 795
Download Devel-Cycle-t.patch
text/x-diff 795b
--- t/Devel-Cycle.old 2008-07-08 21:26:35.000000000 -0400 +++ t/Devel-Cycle.t 2010-04-16 20:39:04.000000000 -0400 @@ -5,7 +5,7 @@ # change 'tests => 1' to 'tests => last_test_to_print'; -use Test::More tests => 12; +use Test::More tests => 13; use Scalar::Util qw(weaken isweak); BEGIN { use_ok('Devel::Cycle') }; @@ -87,6 +87,7 @@ } { + no warnings qw{ once }; *FOOBAR = *FOOBAR if 0; # cease -w my $test2 = { glob => \*FOOBAR }; @@ -101,6 +102,15 @@ is("@warnings", "", "Warn only once"); } +{ + my $test_re = qr{foo}xms; + + my @warnings; + local $SIG{__WARN__} = sub { push @warnings, @_ }; + find_cycle($test_re); + ok( !@warnings, 'No warnings on Regex' ); +} + package foo; use overload q("") => sub{ return 1 }; # show false alarm
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-9726-1294825544-39.56681-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
RT-Send-CC: modules [...] perl.org, lincoln.stein [...] gmail.com
Content-Length: 847
Download (untitled) / with headers
text/plain 847b
On Fri Apr 16 21:01:50 2010, WYANT wrote: Show quoted text
> Under Perl 5.12.0: > > $ perl -MDevel::Cycle -e 'my $foo = qr{bar}smx; find_cycle($foo)' > Unhandled type: REGEXP at > /usr/local/perl/5.12.0/lib/site_perl/5.12.0/Devel/Cycle.pm line 107. > > This appears to be because regular expressions have become first-class > objects under 5.12, so UNIVERSAL::isa($thingy,'SCALAR'), which was true > under 5.10 when $thingy contained a reference to a regexp, is false > under 5.12. > > The attached patches against 1.11 restore the 5.10 behavior under 5.12, > by having _get_type() return 'SCALAR' when > UNIVERSAL::isa($thingy,'Regexp') is true, and test the handling of > regexps. The patches test without reporting any errors under both 5.10.1 > and 5.12.0
It has been almost 9 months since this bug was filed. Any chance of another release of Devel::Cycle?
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-27649-1351094301-1714.56681-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
RT-Send-CC: modules [...] perl.org, lincoln.stein [...] gmail.com
Content-Length: 50
I have similar issues with "Unhandled type: GLOB".
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-20239-1351099180-1066.56681-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 110
Download (untitled) / with headers
text/plain 110b
This family of bugs will be fixed over the next few days after I transition the source code from CVS to git.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-30901-1363819249-257.56681-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
RT-Send-CC: modules [...] perl.org, lincoln.stein [...] gmail.com
Content-Length: 642
Download (untitled) / with headers
text/plain 642b
On Fri Apr 16 18:01:50 2010, WYANT wrote: Show quoted text
> This appears to be because regular expressions have become first-class > objects under 5.12, so UNIVERSAL::isa($thingy,'SCALAR'), which was true > under 5.10 when $thingy contained a reference to a regexp, is false > under 5.12.
It is not valid to use UNIVERSAL::isa in this way: 1. isa is only a (object or class) method, not a function - it must have an invocant 2. isa should only properly be used for class names or blessed objects, not for base types -- to check the base type of a reference, use Scalar::Util::reftype. Is the repository in git yet? If so, I can provide patches. thank you!
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-20239-1351099180-1066.56681-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-3.8.HEAD-20239-1351099180-1066.56681-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-29554-1383504076-341.56681-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 214
Download (untitled) / with headers
text/plain 214b
On Wed Oct 24 13:19:40 2012, LDS wrote: Show quoted text
> This family of bugs will be fixed over the next few days after I > transition the source code from CVS to git.
I'd love to see this fixed, and I'll even be happy to help.
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-29554-1383504076-341.56681-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-3.8.HEAD-20239-1351099180-1066.56681-0-0 [...] rt.cpan.org> <rt-4.0.18-29554-1383504076-341.56681-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-3375-1415918449-47.56681-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 274
Download (untitled) / with headers
text/plain 274b
On Sun Nov 03 13:41:16 2013, KSTAR wrote: Show quoted text
> On Wed Oct 24 13:19:40 2012, LDS wrote:
> > This family of bugs will be fixed over the next few days after I > > transition the source code from CVS to git.
> > I'd love to see this fixed, and I'll even be happy to help.
Bump!
MIME-Version: 1.0
X-Spam-Status: No, score=-4.635 tagged_above=-99.9 required=10 tests=[AWL=1.265, BAYES_00=-1.9, FROM_OUR_RT=-4] autolearn=ham
In-Reply-To: <rt-4.0.18-3375-1415918450-1111.56681-6-0 [...] rt.cpan.org>
Content-Disposition: inline
X-Spam-Flag: NO
X-RT-Interface: API
References: <RT-Ticket-56681 [...] rt.cpan.org> <rt-3.8.HEAD-20239-1351099180-1066.56681-6-0 [...] rt.cpan.org> <rt-4.0.18-29554-1383504076-341.56681-6-0 [...] rt.cpan.org> <rt-4.0.18-3375-1415918450-1111.56681-6-0 [...] rt.cpan.org>
X-Acl-Warn: !authenticated = *
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <20141113225611.GE99907 [...] tequila>
content-type: text/plain; charset="utf-8"
X-Spam-Score-Int: 0
X-RT-Original-Encoding: utf-8
X-Spam-Score: -4.635
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 9E08161E003 for <cpan-bug+Devel-Cycle [...] hipster.bestpractical.com>; Thu, 13 Nov 2014 17:56:18 -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 BsvdxQENG18e for <cpan-bug+Devel-Cycle [...] hipster.bestpractical.com>; Thu, 13 Nov 2014 17:56:17 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 6EA8D2403A4 for <bug-Devel-Cycle [...] rt.cpan.org>; Thu, 13 Nov 2014 17:56:17 -0500 (EST)
Received: (qmail 3640 invoked by alias); 13 Nov 2014 22:56:16 -0000
Received: from ns2.lightspeed.ca (HELO www.lightspeed.ca) (206.12.82.4) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Thu, 13 Nov 2014 14:56:15 -0800
Received: from 69-50-167-197.westerncable.ca ([69.50.167.197] helo=etheridge.ca) by www.lightspeed.ca with esmtp (Exim 4.80) (envelope-from <ether [...] cpan.org>) id 1Xp3JD-0000Gi-FO for bug-Devel-Cycle [...] rt.cpan.org; Thu, 13 Nov 2014 14:56:11 -0800
Delivered-To: cpan-bug+Devel-Cycle [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #56681] Unhandled type: REGEXP at ...Devel/Cycle.pm line 107 under Perl 5.12.0.
User-Agent: Mutt/1.5.21 (2010-09-15)
Return-Path: <ether [...] cpan.org>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+Devel-Cycle [...] hipster.bestpractical.com
X-RT-Mail-Extension: devel-cycle
Date: Thu, 13 Nov 2014 14:56:11 -0800
X-Spam-Level:
X-Spam-Bar: /
To: Olaf Alders via RT <bug-Devel-Cycle [...] rt.cpan.org>
From: Karen Etheridge <ether [...] cpan.org>
RT-Message-ID: <rt-4.0.18-2926-1415919379-38.56681-0-0 [...] rt.cpan.org>
Content-Length: 207
Download (untitled) / with headers
text/plain 207b
On Thu, Nov 13, 2014 at 05:40:50PM -0500, Olaf Alders via RT wrote: Show quoted text
> > I'd love to see this fixed, and I'll even be happy to help.
> > Bump!
*awakens from slumber, finds that someone gave me comaint* :)
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-2926-1415919379-38.56681-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <RT-Ticket-56681 [...] rt.cpan.org> <rt-3.8.HEAD-20239-1351099180-1066.56681-6-0 [...] rt.cpan.org> <rt-4.0.18-29554-1383504076-341.56681-6-0 [...] rt.cpan.org> <rt-4.0.18-3375-1415918450-1111.56681-6-0 [...] rt.cpan.org> <20141113225611.GE99907 [...] tequila> <rt-4.0.18-2926-1415919379-38.56681-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-14986-1415924047-824.56681-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 568
Download (untitled) / with headers
text/plain 568b
On 2014-11-13 14:56:19, ETHER wrote: Show quoted text
> On Thu, Nov 13, 2014 at 05:40:50PM -0500, Olaf Alders via RT wrote:
> > > I'd love to see this fixed, and I'll even be happy to help.
> > > > Bump!
> > *awakens from slumber, finds that someone gave me comaint* :)
Oops, my mistake, I got this email because I'd added myself as a requestor years ago. Lincoln Stein, are you interested in continuing to maintain this distribution, or would you rather hand it off? I found this repository, but it isn't up to date with the last release: https://github.com/rafl/devel-cycle
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-14986-1415924047-824.56681-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <RT-Ticket-56681 [...] rt.cpan.org> <rt-3.8.HEAD-20239-1351099180-1066.56681-6-0 [...] rt.cpan.org> <rt-4.0.18-29554-1383504076-341.56681-6-0 [...] rt.cpan.org> <rt-4.0.18-3375-1415918450-1111.56681-6-0 [...] rt.cpan.org> <20141113225611.GE99907 [...] tequila> <rt-4.0.18-2926-1415919379-38.56681-0-0 [...] rt.cpan.org> <rt-4.0.18-14986-1415924047-824.56681-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-27049-1416584927-1639.56681-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 734
Download (untitled) / with headers
text/plain 734b
On Thu Nov 13 19:14:07 2014, ETHER wrote: Show quoted text
> On 2014-11-13 14:56:19, ETHER wrote:
> > On Thu, Nov 13, 2014 at 05:40:50PM -0500, Olaf Alders via RT wrote:
> > > > I'd love to see this fixed, and I'll even be happy to help.
> > > > > > Bump!
> > > > *awakens from slumber, finds that someone gave me comaint* :)
> > Oops, my mistake, I got this email because I'd added myself as a > requestor years ago. > > Lincoln Stein, are you interested in continuing to maintain this > distribution, or would you rather hand it off? > > I found this repository, but it isn't up to date with the last > release: https://github.com/rafl/devel-cycle
There's a new release which notes that the repo is now at https://github.com/lstein/Devel-Cycle
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-27049-1416584927-1639.56681-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <RT-Ticket-56681 [...] rt.cpan.org> <rt-3.8.HEAD-20239-1351099180-1066.56681-6-0 [...] rt.cpan.org> <rt-4.0.18-29554-1383504076-341.56681-6-0 [...] rt.cpan.org> <rt-4.0.18-3375-1415918450-1111.56681-6-0 [...] rt.cpan.org> <20141113225611.GE99907 [...] tequila> <rt-4.0.18-2926-1415919379-38.56681-0-0 [...] rt.cpan.org> <rt-4.0.18-14986-1415924047-824.56681-0-0 [...] rt.cpan.org> <rt-4.0.18-27049-1416584927-1639.56681-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-11407-1443896775-1157.56681-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 453
Download (untitled) / with headers
text/plain 453b
Hey All, I got HTML-Mason as my CPAN Pull Request Challenge this month and this error is still causing warnings during the test run. alex@yuzu:~/Documents/Git/cpan-pull-request-challenge-2015/10-HTML-Mason$ prove -l t/23-leak2.t t/23-leak2.t .. Unhandled type: REGEXP at /home/alex/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/Devel/Cycle.pm line 107. t/23-leak2.t .. ok All tests successful. That's on Devel::Cycle 1.12.
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-11407-1443896775-1157.56681-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <RT-Ticket-56681 [...] rt.cpan.org> <rt-3.8.HEAD-20239-1351099180-1066.56681-6-0 [...] rt.cpan.org> <rt-4.0.18-29554-1383504076-341.56681-6-0 [...] rt.cpan.org> <rt-4.0.18-3375-1415918450-1111.56681-6-0 [...] rt.cpan.org> <20141113225611.GE99907 [...] tequila> <rt-4.0.18-2926-1415919379-38.56681-0-0 [...] rt.cpan.org> <rt-4.0.18-14986-1415924047-824.56681-0-0 [...] rt.cpan.org> <rt-4.0.18-27049-1416584927-1639.56681-0-0 [...] rt.cpan.org> <rt-4.0.18-11407-1443896775-1157.56681-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-26032-1525264820-1362.56681-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
RT-Send-CC: lincoln.stein [...] gmail.com
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 72
Hello from 2018! Any chance of getting these patches applied? Thank you!
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-26032-1525264820-1362.56681-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <RT-Ticket-56681 [...] rt.cpan.org> <rt-3.8.HEAD-20239-1351099180-1066.56681-6-0 [...] rt.cpan.org> <rt-4.0.18-29554-1383504076-341.56681-6-0 [...] rt.cpan.org> <rt-4.0.18-3375-1415918450-1111.56681-6-0 [...] rt.cpan.org> <20141113225611.GE99907 [...] tequila> <rt-4.0.18-2926-1415919379-38.56681-0-0 [...] rt.cpan.org> <rt-4.0.18-14986-1415924047-824.56681-0-0 [...] rt.cpan.org> <rt-4.0.18-27049-1416584927-1639.56681-0-0 [...] rt.cpan.org> <rt-4.0.18-11407-1443896775-1157.56681-0-0 [...] rt.cpan.org> <rt-4.0.18-26032-1525264820-1362.56681-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-32240-1567621636-346.56681-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 263
Download (untitled) / with headers
text/plain 263b
On 2018-05-02 05:40:20, TONKIN wrote: Show quoted text
> Hello from 2018! Any chance of getting these patches applied? Thank you!
Bump! It looks like all that is needed here is to add a few more lines to the _get_type function for 'REGEXP' and 'GLOB'. Lincoln, how can we help?


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.