aboutsummaryrefslogtreecommitdiff
path: root/devel/p5-PerlX-Maybe/pkg-descr
blob: be1474adcdd035211f6e80ae9ce1af7eab249dc8 (plain) (blame)
1
2
3
4
5
6
7
8
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.

WWW: https://metacpan.org/pod/PerlX::Maybe