FreeBSD.software
Home/devel/p5-PerlX-Maybe

p5-PerlX-Maybe

1.202devel

Return a pair only if they are both defined

Moose classes (and some other classes) distinguish between an attribute being unset and the attribute being set to undef. To ensure that the Person constructor does not try to set a name or age at all when they are undefined, ugly looking code is often used. A slightly more elegant solution is the maybe function.

$pkg install p5-PerlX-Maybe
metacpan.org/pod/PerlX::Maybe
Origin
devel/p5-PerlX-Maybe
Size
50.8KiB
License
ART10, GPLv1+
Maintainer
perl@FreeBSD.org
Dependencies
1 packages
Required by
5 packages

Dependencies (1)

Required By (5)