in reply to Re^2: Wrong idioms
in thread Wrong idioms
"Also - what other languages treat '0' as false?"
It would be horrible if "0" were treated as true, given that the integer 0 is false and Perl silently converts between strings and numbers.
What other languages? PHP does.
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
|
---|
In Section
Seekers of Perl Wisdom