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.
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
--- 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
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
RT-Send-CC: modules [...] perl.org, lincoln.stein [...] gmail.com
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?
RT-Send-CC: modules [...] perl.org, lincoln.stein [...] gmail.com
I have similar issues with "Unhandled type: GLOB".
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.
RT-Send-CC: modules [...] perl.org, lincoln.stein [...] gmail.com
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!
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.
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!
Subject: Re: [rt.cpan.org #56681] Unhandled type: REGEXP at ...Devel/Cycle.pm line 107 under Perl 5.12.0.
Date: Thu, 13 Nov 2014 14:56:11 -0800
To: Olaf Alders via RT <bug-Devel-Cycle [...] rt.cpan.org>
From: Karen Etheridge <ether [...] cpan.org>
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* :)
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
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


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.