Path::Resolver::Types - types for use with Path::Resolver


Path-Resolver documentation Contained in the Path-Resolver distribution.

Index


Code Index:

NAME

Top

Path::Resolver::Types - types for use with Path::Resolver

VERSION

Top

version 3.100451

OVERVIEW

Top

This library will contain any new types needed for use with Path::Resolver.

TYPES

Top

AbsFilePath

This type validates Path::Class::File objects that are absolute paths and readable. They can be coerced from strings by creating a new Path::Class::File from the string.

AUTHOR

Top

Ricardo Signes <rjbs@cpan.org>

COPYRIGHT AND LICENSE

Top


Path-Resolver documentation Contained in the Path-Resolver distribution.

package Path::Resolver::Types;
BEGIN {
  $Path::Resolver::Types::VERSION = '3.100451';
}
# ABSTRACT: types for use with Path::Resolver
use MooseX::Types -declare => [ qw(AbsFilePath) ];
use MooseX::Types::Moose qw(Str);

use namespace::autoclean;

use Path::Class::File;


subtype AbsFilePath,
  as class_type('Path::Class::File'),
  where { $_->is_absolute and -r "$_" };

coerce AbsFilePath, from Str, via { Path::Class::File->new($_) };

1;

__END__