MooseX::Types::OpenModeStr - Type for open mode string
package My::Class; use Moose; use MooseX::Types::OpenModeStr; has file => ( isa => 'Str' ); has mode => ( isa => 'OpenModeStr' ); package main; my $fin = My::Class->new( file => '/etc/passwd', mode => 'r' ); my $fout = My::Class->new( file => '/tmp/pwdnew', mode => 'w' );
This module provides Moose type which represents open mode string. It can be Perl-style canonical mode string (i.e. "+>") or C-style mode string (i.e. "w+").
Moose::Util::TypeConstraints, IO::Moose.
Piotr Roszatycki <dexter@cpan.org>
Copyright (C) 2007, 2008, 2009 by Piotr Roszatycki <dexter@cpan.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
To install IO::Moose, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IO::Moose
CPAN shell
perl -MCPAN -e shell install IO::Moose
For more information on module installation, please visit the detailed CPAN module installation guide.