There's more than one way to do things | |
PerlMonks |
Passing a list to an Objectby lzcd (Pilgrim) |
on Jan 13, 2001 at 06:37 UTC ( [id://51543]=perlquestion: print w/replies, xml ) | Need Help?? |
lzcd has asked for the wisdom of the Perl Monks concerning the following question:
Howdy, What would a journey towards monk'dom be without a newbie question? In my ongoing descovery of perl, I finally decided to tackle the whole OO side of the pie... in very small chunks. Say for instance I've got a happy little piece of code such as:
Now I was expecting to be able to go MyObject->doThat(chew=>'bananas') and recieve 'I like bananas!'. But instead I get 'I like meat!'. Normally the @_ should overwrite the default value, right? What's so different with package/object dodads? Oh where have I strayed from the enlightened path?
Back to
Seekers of Perl Wisdom
|
|