in reply to semantics differences, &ref and &UNIVERSAL::isa()
/spackage A; sub new { my $c = shift; $c = ref $c || $c; bless {}, $c; } package B; @ISA=qw(A); sub new { my $c = shift; $c = ref $c || $c; bless {}, $c; } package main; my $b = new B; print "b isa A = ", $b->isa('A'), "\n"; print "ref b = ", ref($b), "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: semantics differences, &ref and &UNIVERSAL::isa()
by Dog and Pony (Priest) on May 18, 2002 at 17:01 UTC | |
by dakedesu (Scribe) on May 18, 2002 at 20:44 UTC | |
by IlyaM (Parson) on May 18, 2002 at 21:08 UTC | |
by Dog and Pony (Priest) on May 18, 2002 at 21:44 UTC | |
by dakedesu (Scribe) on May 18, 2002 at 23:05 UTC |