in reply to Basic Objects with Overloaded Operators
Is not a good way to find out if a variable is a reference to a Complex or not. The better way is UNIVERSAL::isa(). Every OO class inherits from UNIVERSAL, and so you can always call $object->isa(), like this:unless( ref($b) =~ /\S/ ){}
Other then that nit-pick, this is a good tutorial.unless( $b->isa( 'Complex' ) ){}
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Basic Objects with Overloaded Operators
by perlmonkey (Hermit) on Feb 28, 2001 at 00:59 UTC | |
by Anonymous Monk on Nov 15, 2001 at 06:16 UTC |