Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^4: Moose: problem with accessor

by saintex (Scribe)
on Apr 01, 2011 at 07:38 UTC ( [id://896793]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Moose: problem with accessor
in thread Moose: problem with accessor

hello,
thank you for your excellent answer.

At this point, what is the difference between:
$self->method(), 'changed' and  $self->method('changed') ?

Replies are listed 'Best First'.
Re^5: Moose: problem with accessor
by ikegami (Patriarch) on Apr 01, 2011 at 13:45 UTC

    $self->method() passes no arguments.
    $self->method('changed') passes an argument.

      So, can't I use:
      $self->method => 'changed';
      to pass any arguments?

      is it right?

        I don't understand the question.

        My best guess is that you want me to state that «$self->method => 'changed'» calls "method" with no arguments.

Log In?
Username:
Password:

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

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

    No recent polls found