oldyork90 wrote:
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.

perldoc perlsub

    To call subroutines:

        NAME(LIST);    # & is optional with parentheses.
        NAME LIST;     # Parentheses optional if predeclared/imported.
        &NAME(LIST);   # Circumvent prototypes.
        &NAME;         # Makes current @_ visible to called subroutine.




John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall

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


Reply via email to