":D"
    means it wants actual data in the string and not a Nil.
    The jargon for this requirement is that is is constrained
    to an actual value

    If it wanted a Nil, it would say ":U" or constrained to
    a Nil

Think of :D as a"defined" and :U as "Undefined" - Nil is a special thing,
even though Nil is undefined, it is one of many undefined things, and Nil
has some special uses. A better match for Perl5's "undef" is "Any".

In particular, this!

> my $example is default(5); say $example
5
> $example=Any; say $example
(Any)
> say $example.defined
False
> $example=Nil; say $example
5
> say $example.defined
True

-y

Reply via email to