Help for this page

Select Code to Download


  1. or download this
    use Moose::Util::TypeConstraints;
    
    ...
    coerce 'TrueStr', from 'Any', via { $_ || "whatever" };
    
    has foo => (is => "ro", isa => "TrueStr", coerce => 1);