NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
What about ''? (Score:2)
I don't understand the bit about the final '' in your comment. I think a better way to do that is make method lazy and have the default be:
sub { $_[0]->name }
Re:What about ''? (Score:2)
The reason for the final '' is that it put a string in the method, thus ensuring it would pass type validation. Your solution is much nicer. Thanks :)
Reply to This
Parent