in reply to Re^2: Smartmatch alternatives
in thread Smartmatch alternatives
It makes sense to use hash keys if all the items being searched through are strings. If some of them are regexps, coderefs, objects with overloading, etc., then a hash is not an option.
use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name
|
---|
In Section
Seekers of Perl Wisdom