Skip Menu |

This queue is for tickets about the UNIVERSAL-isa CPAN distribution.

Report information
The Basics
Id: 118609
Status: open
Priority: 0/
Queue: UNIVERSAL-isa

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

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



Running the following code emits the same warnings for all the three usages of isa. I'd expect something else when reading "This can generate many extra warnings, but they're more specific as to the actual wrong practice and they usually suggest proper fixes" in the documentation. #!/usr/bin/perl use warnings; use strict; use UNIVERSAL::isa 'verbose'; my $x = bless {}, 'MyClass'; warn "$] $UNIVERSAL::isa::VERSION\n"; warn $x->isa('MyClass'); warn $x->UNIVERSAL::isa('MyClass'); warn UNIVERSAL::isa($x, 'MyClass'); Output on my machine: 5.018002 1.20150614 Called UNIVERSAL::isa() as a function, not a method at ./2.pl line 10. 1 at ./2.pl line 10. Called UNIVERSAL::isa() as a function, not a method at ./2.pl line 11. 1 at ./2.pl line 11. Called UNIVERSAL::isa() as a function, not a method at ./2.pl line 12. 1 at ./2.pl line 12. Same with Perl 5.25.7.
On Thu Nov 03 13:24:14 2016, CHOROBA wrote: Show quoted text
> Running the following code emits the same warnings for all the three > usages of isa. I'd expect something else when reading "This can > generate many extra warnings, but they're more specific as to the > actual wrong practice and they usually suggest proper fixes" in the > documentation. > > #!/usr/bin/perl > use warnings; > use strict; > > use UNIVERSAL::isa 'verbose'; > > my $x = bless {}, 'MyClass'; > > warn "$] $UNIVERSAL::isa::VERSION\n"; > warn $x->isa('MyClass'); > warn $x->UNIVERSAL::isa('MyClass'); > warn UNIVERSAL::isa($x, 'MyClass'); > > Output on my machine: > > 5.018002 1.20150614 > Called UNIVERSAL::isa() as a function, not a method at ./2.pl line 10. > 1 at ./2.pl line 10. > Called UNIVERSAL::isa() as a function, not a method at ./2.pl line 11. > 1 at ./2.pl line 11. > Called UNIVERSAL::isa() as a function, not a method at ./2.pl line 12. > 1 at ./2.pl line 12. > > Same with Perl 5.25.7.
I'm not sure this is the same as https://rt.cpan.org/Ticket/Display.html?id=97468 as this isn't related to Test::Builder or anything else.
On 2016-11-03 10:29:55, CHOROBA wrote: Show quoted text
> I'm not sure this is the same as > https://rt.cpan.org/Ticket/Display.html?id=97468 as this isn't related > to Test::Builder or anything else.
It is the same issue. Test::Builder was merely one place where it was showing up in the wild. The key bit is this: Show quoted text
> In the absence of some sort of XS or B:: magic that I'm not aware of, there is no way to disambiguate between: > > UNIVERSAL::isa($obj, 'something'); > > and > > $obj->isa('something') > > from within UNIVERSAL::isa. *All* calls to isa during verbose mode will warn.
It is still unsolved, and presumed to be unsolvable.
On Thu Nov 03 13:54:15 2016, ETHER wrote: Show quoted text
> On 2016-11-03 10:29:55, CHOROBA wrote: >
> > I'm not sure this is the same as > > https://rt.cpan.org/Ticket/Display.html?id=97468 as this isn't > > related > > to Test::Builder or anything else.
> > It is the same issue. Test::Builder was merely one place where it was > showing up in the wild. > > The key bit is this: >
> > In the absence of some sort of XS or B:: magic that I'm not aware of, > > there is no way to disambiguate between: > > > > UNIVERSAL::isa($obj, 'something'); > > > > and > > > > $obj->isa('something') > > > > from within UNIVERSAL::isa. *All* calls to isa during verbose mode > > will warn.
> > It is still unsolved, and presumed to be unsolvable.
Shouldn't the documentation be updated, then? :-)