our $AUTHORITY = 'cpan:THEPLER';
use Path::Class ();
-# TODO: export dir() and file() from Path::Class
+# TODO: export dir() and file() from Path::Class? (maybe)
use MooseX::Types
-declare => [qw( Dir File )];
}
# optionally add Getopt option type
-use English qw(-no_match_vars);
eval { require MooseX::Getopt; };
-if ( !$EVAL_ERROR ) {
+if ( !$@ ) {
MooseX::Getopt::OptionTypeMap->add_option_type_to_map( $_, '=s', )
for ( 'Path::Class::Dir', 'Path::Class::File', Dir, File, );
}
1;
__END__
+
=head1 NAME
MooseX::Types::Path::Class - A Path::Class type library for Moose
the Getopt option type ("=s") will be added for both
L<Path::Class::Dir> and L<Path::Class::File>.
-This is just meant to be a central place for these constructs, so you
-don't have to worry about whether they've been created or not, and
-you're not tempted to copy them into yet another class (like I was).
=head1 EXPORTS