CC: | garfieldnate [...] gmail.com |
Subject: | Better documentation of usage of find_my_self |
In my subclass of Test::Base, I had to use the following to get the arguments properly:
($self, @_) = find_my_self($self, @_);
The code using find_my_self in the documentation yields incorrect behavior and a warning.
Spiffy puts "my $self = shift" at the beginning of the method, so redeclaring $self with "my" yields an error. Since @_ was shifted into $self, you have to supply $self to find_my_self to actually get all of the correct arguments back. Using this line, I don't have to add undef as the first argument every time I call the function.