On Wed, Oct 14, 2009 at 11:24 AM, Sartak <[email protected]> wrote:
> On Wed, Oct 14, 2009 at 11:08 AM, Yuri Shtil <[email protected]> wrote:
>>> $obj->meta->has_attribute('foo')
>>>
>>> Reading through the Class::MOP docs is helpful in finding out how to
>>> access all of the class definition information that gets stored.
>>>
>>> -doy
>>>
>>
>> Sorry for reopening an old subject.
>> This does not work if the attribute is inherited.
>>
>> --
>>
>> Yuri
>>
>>
>
> $obj->meta->find_attribute_by_name('foo') will check superclasses too.
>
> Shawn

Which is mentioned in the documentation that doy pointed you to
(http://search.cpan.org/~drolsky/Class-MOP-0.94/lib/Class/MOP/Class.pm#Attribute_introspection_and_creation).

-Chris

Reply via email to