in reply to Have I found a bug in Perl?
Perhaps Scalar::Util's blessed() is a better check for objectness.
I ran the following code and all tests pass under Perl 5.8.2. Odd.
#!/usr/bin/perl -w use strict; package Foo; use strict; use vars '$VERSION'; $VERSION = 1; package main; use Test::More tests => 4; my $foo = bless {}, 'Foo'; isa_ok( $foo, 'UNIVERSAL' ); ok( UNIVERSAL::isa( 'Foo', 'UNIVERSAL' ) ); @Foo::ISA = (); isa_ok( $foo, 'UNIVERSAL' ); ok( UNIVERSAL::isa( 'Foo', 'UNIVERSAL' ) );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Have I found a bug in Perl?
by adamk (Chaplain) on Jan 11, 2004 at 07:29 UTC |