MouseX::Types::Data::Monad::Maybe - A type constraint for Data::Monad::Maybe
use Data::Monad::Maybe qw( just nothing ); use MouseX::Types::Data::Monad::Maybe; use Smart::Args qw( args ); sub from_api { args my $json => 'MaybeM[HashRef]'; $json->flat_map(sub { # ... }); } from_api(just +{ ok => 1 }); from_api(nothing);
MouseX::Types::Data::Monad::Maybe defines a type constraint for Data::Monad::Maybe.
Mouse, Data::Monad::Maybe
Copyright (C) aereal.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
aereal <aereal@aereal.org>
To install MouseX::Types::Data::Monad, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MouseX::Types::Data::Monad
CPAN shell
perl -MCPAN -e shell install MouseX::Types::Data::Monad
For more information on module installation, please visit the detailed CPAN module installation guide.