Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
How to tell if an object inherits from a particular class?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
fishfry  
View profile  
 More options Nov 5, 12:30 am
Newsgroups: comp.lang.perl.misc
From: fishfry <BLOCKSPAMfish...@your-mailbox.com>
Date: Wed, 04 Nov 2009 22:30:38 -0700
Local: Thurs, Nov 5 2009 12:30 am
Subject: How to tell if an object inherits from a particular class?
If I want to know if an object is of class Foo, I can call ref(object).

But if Foo inherits from Bar and I want to know if an object (of class
Foo) is of class Bar ... is there a convenient way to do that?


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Makholm  
View profile  
 More options Nov 5, 1:45 am
Newsgroups: comp.lang.perl.misc
From: Peter Makholm <pe...@makholm.net>
Date: Thu, 05 Nov 2009 07:45:04 +0100
Local: Thurs, Nov 5 2009 1:45 am
Subject: Re: How to tell if an object inherits from a particular class?

fishfry <BLOCKSPAMfish...@your-mailbox.com> writes:
> But if Foo inherits from Bar and I want to know if an object (of class
> Foo) is of class Bar ... is there a convenient way to do that?

  $obj->isa('Bar')

Read 'perldoc perlobj' looke for the heading 'Default UNIVERSAL
metods' and read 'perldoc UNIVERSAL'

//Makholm


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google