Hi,
Answers as I understand things...
John M. Dlugosz wrote:
1) How do you declare a private method? I see how you call one, but
not how to define one.
my method foo { ... }
1b) Is the intent that $!foo without an explicit invocant refers to
self, as opposed to $.bar or .bar which refers to $_ ?
$.bar also refers to self. You'd use just .bar to do a call on $_.
2) re: has $brain; # also declares $!brain;
Does that mean that $brain by itself refers to $self!brain ?
$!brain refers to the underlying storage location, and this declaration
introduces $brain as a lexical alias to that.
Thanks,
Jonathan