Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

(tye)Re: Is reference blessed?

by tye (Sage)
on Nov 26, 2001 at 10:38 UTC ( [id://127499]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if(  ! ref($r)  ) {
        # no reference at all
    } elsif(  ! UNIVERSAL::can($r,'can')  ) {
    ...
    } else {
        # blessed ref
    }
    
  2. or download this
        if(  ref($r)  &&  UNIVERSAL::can($r,'can')  ) {
            # blessed ref
        }
    
  3. or download this
        if(  ref($r)  &&  eval { $r->can('can') }  ) {
            # blessed ref
        }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://127499]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-25 23:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found