Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    MooseX::Types::Moose::MutualCoercion 0.03

    Download button

    No screenshots available
    Downloads: 167  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    MORIYA Masaki | More programs
    Perl Artistic License / FREE
    January 27th, 2011, 06:03 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    MooseX::Types::Moose::MutualCoercion description

    Mutual coercions for common type constraints of Moose

    MooseX::Types::Moose::MutualCoercion is a Perl module that packages several Moose::Util::TypeConstraints with coercions, designed to mutually coerce with the built-in and common types known to Moose.

    SYNOPSIS

     {
     package Foo;
     use Moose;
     use MooseX::Types::Moose::MutualCoercion
     qw(StrToArrayRef ArrayRefToHashKeys);
     has 'thingies' =>
     (is => 'rw', isa => StrToArrayRef, coerce => 1);
     has 'lookup_table' =>
     (is => 'rw', isa => ArrayRefToHashKeys, coerce => 1);
     1;
     }

     my $foo = Foo->new( thingies => 'bar' );
     print $foo->thingies->[0]; # 'bar'

     $foo->lookup_table( [qw(baz qux)] );
     print 'eureka!' # 'eureka!'
     if grep {
     exists $foo->lookup_table->{$_};
     } qw(foo bar baz);



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    type constraints | Perl module | Moose | type | constraints

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM