I would assume that somewhere in MooseX::Types, it is declared how to pass an instance of a type or undef. Other languages use a Maybe(Str) construct for that, but I don't know what the Moose people believe should be used. Moose::Util::TypeConstraints claim that there is Maybe[`a], so maybe that's what you should use:
Maybe[Str] $foo
In reply to Re: Passing Str or undef ?
by Corion
in thread Passing Str or undef ?
by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |