1MouseX::Types::Path::ClUassesr(3C)ontributed Perl DocumeMnotuasteiXo:n:Types::Path::Class(3)
2
3
4

NAME

6       MouseX::Types::Path::Class - A Path::Class type library for Mouse
7

SYNOPSIS

9   CLASS TYPES
10         package MyApp;
11         use Mouse;
12         use MouseX::Types::Path::Class;
13
14         has 'dir' => (
15             is       => 'ro',
16             isa      => 'Path::Class::Dir',
17             required => 1,
18             coerce   => 1,
19         );
20
21         has 'file' => (
22             is       => 'ro',
23             isa      => 'Path::Class::File',
24             required => 1,
25             coerce   => 1,
26         );
27
28   CUSTOM TYPES
29         package MyApp;
30         use Mouse;
31         use MouseX::Types::Path::Class qw(Dir File);
32
33         has 'dir' => (
34             is       => 'ro',
35             isa      => Dir,
36             required => 1,
37             coerce   => 1,
38         );
39
40         has 'file' => (
41             is       => 'ro',
42             isa      => File,
43             required => 1,
44             coerce   => 1,
45         );
46

DESCRIPTION

48       MouseX::Types::Path::Class creates common Mouse types, coercions and
49       option specifications useful for dealing with Path::Class objects as
50       Mouse attributes.
51
52       Coercions (see Mouse::Util::TypeConstraints) are made from both "Str"
53       and "ArrayRef" to both Path::Class::Dir and Path::Class::File objects.
54       If you have MouseX::Getopt installed, the Getopt option type ("=s")
55       will be added for both Path::Class::Dir and Path::Class::File.
56

TYPES

58   Dir
59           A Path::Class::Dir class type.
60
61           Coerces from "Str" and "ArrayRef" via "new" in Path::Class::Dir.
62
63   File
64           A Path::Class::File class type.
65
66           Coerces from "Str" and "ArrayRef" via "new" in Path::Class::File.
67

AUTHOR

69       NAKAGAWA Masaki <masaki@cpan.org>
70

THANKS TO

72       "AUTHOR" in MooseX::Types::Path::Class
73

LICENSE

75       This library is free software; you can redistribute it and/or modify it
76       under the same terms as Perl itself.
77

SEE ALSO

79       Mouse, MouseX::Types,
80
81       Path::Class,
82
83       MooseX::Types::Path::Class
84
85
86
87perl v5.38.0                      2023-07-21     MouseX::Types::Path::Class(3)
Impressum