> I am using a module having documentation saying document() is a
> method.  However, I see it used as
> 
> $o->document;
> 
> Can you reference a method in this way?  (I takes no args).  I always
> thought
> 
> $o->document() and $o->document meant different things, function
> verses attribute.
> 

Your thought is wrong -- Perl 5 objects have no concept of
"attributes", there are only methods.  There are numerous classes
(Moose, Class::Accessor to name two) that implement the concept of
attributes, but they are implemented as methods.

--L







-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to