in reply to has it been blessed?

Try this is you're just checking for the method
if($obj->can("invoke_method")) { $obj->invoke_method(); }
wait til 5.8 for the blessed() function or read ehdonhon's node.
HTH

broquaint

Replies are listed 'Best First'.
Re: Re: has it been blessed?
by gellyfish (Monsignor) on Mar 06, 2002 at 16:17 UTC

    or wait til 5.8 for the blessed() function.

    Or get it now by installing the module Scalar::Util from CPAN ;-}

    /J\

Re: Re: has it been blessed?
by ehdonhon (Curate) on Mar 06, 2002 at 16:09 UTC

    If $obj hasn't been blessed at all, that will still fail.

      But you can use can in a non-OO way: if (UNIVERSAL::can($obj, 'method'))

      dave hj~