| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
## no critic (Modules::ProhibitExcessMainComplexity) |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
use strict; |
|
4
|
1
|
|
|
1
|
|
261444
|
use warnings; |
|
|
1
|
|
|
|
|
14
|
|
|
|
1
|
|
|
|
|
31
|
|
|
5
|
1
|
|
|
1
|
|
6
|
|
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
45
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.05'; |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use overload (); |
|
9
|
1
|
|
|
1
|
|
5
|
use Path::Tiny 0.087; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
17
|
|
|
10
|
1
|
|
|
1
|
|
13
|
use Scalar::Util qw( blessed ); |
|
|
1
|
|
|
|
|
44
|
|
|
|
1
|
|
|
|
|
53
|
|
|
11
|
1
|
|
|
1
|
|
6
|
use Specio 0.29 (); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
38
|
|
|
12
|
1
|
|
|
1
|
|
447
|
use Specio::Declare; |
|
|
1
|
|
|
|
|
132
|
|
|
|
1
|
|
|
|
|
20
|
|
|
13
|
1
|
|
|
1
|
|
6
|
use Specio::Library::Builtins; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
10
|
|
|
14
|
1
|
|
|
1
|
|
203
|
use Specio::PartialDump qw( partial_dump ); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
8
|
|
|
15
|
1
|
|
|
1
|
|
8262
|
|
|
|
1
|
|
|
|
|
10
|
|
|
|
1
|
|
|
|
|
82
|
|
|
16
|
|
|
|
|
|
|
use parent 'Specio::Exporter'; |
|
17
|
1
|
|
|
1
|
|
5
|
|
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
10
|
|
|
18
|
|
|
|
|
|
|
my $not_blessed = sub { |
|
19
|
|
|
|
|
|
|
return blessed $_[0] ? q{} : "$_[1] is not an object"; |
|
20
|
|
|
|
|
|
|
}; |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
my $not_path_tiny = sub { |
|
23
|
|
|
|
|
|
|
return $_[0]->isa('Path::Tiny') |
|
24
|
|
|
|
|
|
|
? q{} |
|
25
|
|
|
|
|
|
|
: "$_[1] is not a Path::Tiny object"; |
|
26
|
|
|
|
|
|
|
}; |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
my $not_absolute = sub { |
|
29
|
|
|
|
|
|
|
return $_[0]->is_absolute ? q{} : "$_[0] is not an absolute path"; |
|
30
|
|
|
|
|
|
|
}; |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
my $not_real = sub { |
|
33
|
|
|
|
|
|
|
return $_[0]->realpath eq $_[0] ? q{} : "$_[0] is not a real path"; |
|
34
|
|
|
|
|
|
|
}; |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
my $not_file = sub { |
|
37
|
|
|
|
|
|
|
return $_[0]->is_file ? q{} : "$_[0] is not a file on disk"; |
|
38
|
|
|
|
|
|
|
}; |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
my $not_dir = sub { |
|
41
|
|
|
|
|
|
|
return $_[0]->is_dir ? q{} : "$_[0] is not a directory on disk"; |
|
42
|
|
|
|
|
|
|
}; |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
declare( |
|
45
|
|
|
|
|
|
|
'Path', |
|
46
|
|
|
|
|
|
|
parent => object_isa_type('Path::Tiny'), |
|
47
|
|
|
|
|
|
|
message_generator => sub { |
|
48
|
|
|
|
|
|
|
my $dump = partial_dump( $_[1] ); |
|
49
|
|
|
|
|
|
|
return $not_blessed->( $_[1], $dump ) |
|
50
|
|
|
|
|
|
|
|| $not_path_tiny->( $_[1], $dump ); |
|
51
|
|
|
|
|
|
|
}, |
|
52
|
|
|
|
|
|
|
); |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
declare( |
|
55
|
|
|
|
|
|
|
'AbsPath', |
|
56
|
|
|
|
|
|
|
parent => t('Path'), |
|
57
|
|
|
|
|
|
|
inline => sub { |
|
58
|
|
|
|
|
|
|
return sprintf( |
|
59
|
|
|
|
|
|
|
'( %s && %s->is_absolute )', |
|
60
|
|
|
|
|
|
|
$_[0]->parent->inline_check( $_[1] ), |
|
61
|
|
|
|
|
|
|
$_[1] |
|
62
|
|
|
|
|
|
|
); |
|
63
|
|
|
|
|
|
|
}, |
|
64
|
|
|
|
|
|
|
message_generator => sub { |
|
65
|
|
|
|
|
|
|
my $dump = partial_dump( $_[1] ); |
|
66
|
|
|
|
|
|
|
return |
|
67
|
|
|
|
|
|
|
$not_blessed->( $_[1], $dump ) |
|
68
|
|
|
|
|
|
|
|| $not_path_tiny->( $_[1], $dump ) |
|
69
|
|
|
|
|
|
|
|| $not_absolute->( $_[1], $dump ); |
|
70
|
|
|
|
|
|
|
}, |
|
71
|
|
|
|
|
|
|
); |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
declare( |
|
74
|
|
|
|
|
|
|
'RealPath', |
|
75
|
|
|
|
|
|
|
parent => t('Path'), |
|
76
|
|
|
|
|
|
|
inline => sub { |
|
77
|
|
|
|
|
|
|
return sprintf( |
|
78
|
|
|
|
|
|
|
'( %s && %s->realpath eq %s )', |
|
79
|
|
|
|
|
|
|
$_[0]->parent->inline_check( $_[1] ), |
|
80
|
|
|
|
|
|
|
$_[1], $_[1] |
|
81
|
|
|
|
|
|
|
); |
|
82
|
|
|
|
|
|
|
}, |
|
83
|
|
|
|
|
|
|
message_generator => sub { |
|
84
|
|
|
|
|
|
|
my $dump = partial_dump( $_[1] ); |
|
85
|
|
|
|
|
|
|
return |
|
86
|
|
|
|
|
|
|
$not_blessed->( $_[1], $dump ) |
|
87
|
|
|
|
|
|
|
|| $not_path_tiny->( $_[1], $dump ) |
|
88
|
|
|
|
|
|
|
|| $not_real->( $_[1], $dump ); |
|
89
|
|
|
|
|
|
|
}, |
|
90
|
|
|
|
|
|
|
); |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
declare( |
|
93
|
|
|
|
|
|
|
'File', |
|
94
|
|
|
|
|
|
|
parent => t('Path'), |
|
95
|
|
|
|
|
|
|
inline => sub { |
|
96
|
|
|
|
|
|
|
return sprintf( |
|
97
|
|
|
|
|
|
|
'( %s && %s->is_file )', |
|
98
|
|
|
|
|
|
|
$_[0]->parent->inline_check( $_[1] ), |
|
99
|
|
|
|
|
|
|
$_[1] |
|
100
|
|
|
|
|
|
|
); |
|
101
|
|
|
|
|
|
|
}, |
|
102
|
|
|
|
|
|
|
message_generator => sub { |
|
103
|
|
|
|
|
|
|
my $dump = partial_dump( $_[1] ); |
|
104
|
|
|
|
|
|
|
return |
|
105
|
|
|
|
|
|
|
$not_blessed->( $_[1], $dump ) |
|
106
|
|
|
|
|
|
|
|| $not_path_tiny->( $_[1], $dump ) |
|
107
|
|
|
|
|
|
|
|| $not_file->( $_[1], $dump ); |
|
108
|
|
|
|
|
|
|
}, |
|
109
|
|
|
|
|
|
|
); |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
declare( |
|
112
|
|
|
|
|
|
|
'AbsFile', |
|
113
|
|
|
|
|
|
|
parent => t('Path'), |
|
114
|
|
|
|
|
|
|
inline => sub { |
|
115
|
|
|
|
|
|
|
return sprintf( |
|
116
|
|
|
|
|
|
|
'( %s && %s->is_file && %s->is_absolute )', |
|
117
|
|
|
|
|
|
|
$_[0]->parent->inline_check( $_[1] ), |
|
118
|
|
|
|
|
|
|
$_[1], $_[1] |
|
119
|
|
|
|
|
|
|
); |
|
120
|
|
|
|
|
|
|
}, |
|
121
|
|
|
|
|
|
|
message_generator => sub { |
|
122
|
|
|
|
|
|
|
my $dump = partial_dump( $_[1] ); |
|
123
|
|
|
|
|
|
|
return |
|
124
|
|
|
|
|
|
|
$not_blessed->( $_[1], $dump ) |
|
125
|
|
|
|
|
|
|
|| $not_path_tiny->( $_[1], $dump ) |
|
126
|
|
|
|
|
|
|
|| $not_file->( $_[1], $dump ) |
|
127
|
|
|
|
|
|
|
|| $not_absolute->( $_[1], $dump ); |
|
128
|
|
|
|
|
|
|
}, |
|
129
|
|
|
|
|
|
|
); |
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
declare( |
|
132
|
|
|
|
|
|
|
'RealFile', |
|
133
|
|
|
|
|
|
|
parent => t('Path'), |
|
134
|
|
|
|
|
|
|
inline => sub { |
|
135
|
|
|
|
|
|
|
return sprintf( |
|
136
|
|
|
|
|
|
|
'( %s && %s->is_file && %s->realpath eq %s )', |
|
137
|
|
|
|
|
|
|
$_[0]->parent->inline_check( $_[1] ), |
|
138
|
|
|
|
|
|
|
$_[1], $_[1], $_[1] |
|
139
|
|
|
|
|
|
|
); |
|
140
|
|
|
|
|
|
|
}, |
|
141
|
|
|
|
|
|
|
message_generator => sub { |
|
142
|
|
|
|
|
|
|
my $dump = partial_dump( $_[1] ); |
|
143
|
|
|
|
|
|
|
return |
|
144
|
|
|
|
|
|
|
$not_blessed->( $_[1], $dump ) |
|
145
|
|
|
|
|
|
|
|| $not_path_tiny->( $_[1], $dump ) |
|
146
|
|
|
|
|
|
|
|| $not_file->( $_[1], $dump ) |
|
147
|
|
|
|
|
|
|
|| $not_real->( $_[1], $dump ); |
|
148
|
|
|
|
|
|
|
}, |
|
149
|
|
|
|
|
|
|
); |
|
150
|
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
declare( |
|
152
|
|
|
|
|
|
|
'Dir', |
|
153
|
|
|
|
|
|
|
parent => t('Path'), |
|
154
|
|
|
|
|
|
|
inline => sub { |
|
155
|
|
|
|
|
|
|
return sprintf( |
|
156
|
|
|
|
|
|
|
'( %s && %s->is_dir )', |
|
157
|
|
|
|
|
|
|
$_[0]->parent->inline_check( $_[1] ), |
|
158
|
|
|
|
|
|
|
$_[1] |
|
159
|
|
|
|
|
|
|
); |
|
160
|
|
|
|
|
|
|
}, |
|
161
|
|
|
|
|
|
|
message_generator => sub { |
|
162
|
|
|
|
|
|
|
my $dump = partial_dump( $_[1] ); |
|
163
|
|
|
|
|
|
|
return |
|
164
|
|
|
|
|
|
|
$not_blessed->( $_[1], $dump ) |
|
165
|
|
|
|
|
|
|
|| $not_path_tiny->( $_[1], $dump ) |
|
166
|
|
|
|
|
|
|
|| $not_dir->( $_[1], $dump ); |
|
167
|
|
|
|
|
|
|
}, |
|
168
|
|
|
|
|
|
|
); |
|
169
|
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
declare( |
|
171
|
|
|
|
|
|
|
'AbsDir', |
|
172
|
|
|
|
|
|
|
parent => t('Path'), |
|
173
|
|
|
|
|
|
|
inline => sub { |
|
174
|
|
|
|
|
|
|
return sprintf( |
|
175
|
|
|
|
|
|
|
'( %s && %s->is_dir && %s->is_absolute )', |
|
176
|
|
|
|
|
|
|
$_[0]->parent->inline_check( $_[1] ), |
|
177
|
|
|
|
|
|
|
$_[1], $_[1], |
|
178
|
|
|
|
|
|
|
); |
|
179
|
|
|
|
|
|
|
}, |
|
180
|
|
|
|
|
|
|
message_generator => sub { |
|
181
|
|
|
|
|
|
|
my $dump = partial_dump( $_[1] ); |
|
182
|
|
|
|
|
|
|
return |
|
183
|
|
|
|
|
|
|
$not_blessed->( $_[1], $dump ) |
|
184
|
|
|
|
|
|
|
|| $not_path_tiny->( $_[1], $dump ) |
|
185
|
|
|
|
|
|
|
|| $not_dir->( $_[1], $dump ) |
|
186
|
|
|
|
|
|
|
|| $not_absolute->( $_[1], $dump ); |
|
187
|
|
|
|
|
|
|
}, |
|
188
|
|
|
|
|
|
|
); |
|
189
|
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
declare( |
|
191
|
|
|
|
|
|
|
'RealDir', |
|
192
|
|
|
|
|
|
|
parent => t('Path'), |
|
193
|
|
|
|
|
|
|
inline => sub { |
|
194
|
|
|
|
|
|
|
return sprintf( |
|
195
|
|
|
|
|
|
|
'( %s && %s->is_dir && %s->realpath eq %s )', |
|
196
|
|
|
|
|
|
|
$_[0]->parent->inline_check( $_[1] ), |
|
197
|
|
|
|
|
|
|
$_[1], $_[1], $_[1] |
|
198
|
|
|
|
|
|
|
); |
|
199
|
|
|
|
|
|
|
}, |
|
200
|
|
|
|
|
|
|
message_generator => sub { |
|
201
|
|
|
|
|
|
|
my $dump = partial_dump( $_[1] ); |
|
202
|
|
|
|
|
|
|
return |
|
203
|
|
|
|
|
|
|
$not_blessed->( $_[1], $dump ) |
|
204
|
|
|
|
|
|
|
|| $not_path_tiny->( $_[1], $dump ) |
|
205
|
|
|
|
|
|
|
|| $not_dir->( $_[1], $dump ) |
|
206
|
|
|
|
|
|
|
|| $not_real->( $_[1], $dump ); |
|
207
|
|
|
|
|
|
|
}, |
|
208
|
|
|
|
|
|
|
); |
|
209
|
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
for my $type ( map { t($_) } qw( Path File Dir ) ) { |
|
211
|
|
|
|
|
|
|
coerce( |
|
212
|
|
|
|
|
|
|
$type, |
|
213
|
|
|
|
|
|
|
from => t('Str'), |
|
214
|
|
|
|
|
|
|
inline => sub {"Path::Tiny::path( $_[1] )"}, |
|
215
|
|
|
|
|
|
|
); |
|
216
|
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
coerce( |
|
218
|
|
|
|
|
|
|
$type, |
|
219
|
|
|
|
|
|
|
from => t('ArrayRef'), |
|
220
|
|
|
|
|
|
|
inline => sub {"Path::Tiny::path( \@{ $_[1] } )"}, |
|
221
|
|
|
|
|
|
|
); |
|
222
|
|
|
|
|
|
|
} |
|
223
|
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
for my $type ( map { t($_) } qw( AbsPath AbsFile AbsDir ) ) { |
|
225
|
|
|
|
|
|
|
coerce( |
|
226
|
|
|
|
|
|
|
$type, |
|
227
|
|
|
|
|
|
|
from => t('Path'), |
|
228
|
|
|
|
|
|
|
inline => sub { sprintf( '%s->absolute', $_[1] ) }, |
|
229
|
|
|
|
|
|
|
); |
|
230
|
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
coerce( |
|
232
|
|
|
|
|
|
|
$type, |
|
233
|
|
|
|
|
|
|
from => t('Str'), |
|
234
|
|
|
|
|
|
|
inline => |
|
235
|
|
|
|
|
|
|
sub { sprintf( 'Path::Tiny::path( %s )->absolute', $_[1] ) }, |
|
236
|
|
|
|
|
|
|
); |
|
237
|
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
coerce( |
|
239
|
|
|
|
|
|
|
$type, |
|
240
|
|
|
|
|
|
|
from => t('ArrayRef'), |
|
241
|
|
|
|
|
|
|
inline => |
|
242
|
|
|
|
|
|
|
sub { sprintf( 'Path::Tiny::path( @{ %s } )->absolute', $_[1] ) }, |
|
243
|
|
|
|
|
|
|
); |
|
244
|
|
|
|
|
|
|
} |
|
245
|
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
for my $type ( map { t($_) } qw( RealPath RealFile RealDir ) ) { |
|
247
|
|
|
|
|
|
|
coerce( |
|
248
|
|
|
|
|
|
|
$type, |
|
249
|
|
|
|
|
|
|
from => t('Path'), |
|
250
|
|
|
|
|
|
|
inline => sub { sprintf( '%s->realpath', $_[1] ) }, |
|
251
|
|
|
|
|
|
|
); |
|
252
|
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
coerce( |
|
254
|
|
|
|
|
|
|
$type, |
|
255
|
|
|
|
|
|
|
from => t('Str'), |
|
256
|
|
|
|
|
|
|
inline => |
|
257
|
|
|
|
|
|
|
sub { sprintf( 'Path::Tiny::path( %s )->realpath', $_[1] ) }, |
|
258
|
|
|
|
|
|
|
); |
|
259
|
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
coerce( |
|
261
|
|
|
|
|
|
|
$type, |
|
262
|
|
|
|
|
|
|
from => t('ArrayRef'), |
|
263
|
|
|
|
|
|
|
inline => |
|
264
|
|
|
|
|
|
|
sub { sprintf( 'Path::Tiny::path( @{ %s } )->realpath', $_[1] ) }, |
|
265
|
|
|
|
|
|
|
); |
|
266
|
|
|
|
|
|
|
} |
|
267
|
|
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
1; |
|
269
|
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
# ABSTRACT: Path::Tiny types and coercions for Specio |
|
271
|
|
|
|
|
|
|
|
|
272
|
|
|
|
|
|
|
|
|
273
|
|
|
|
|
|
|
=pod |
|
274
|
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
=encoding UTF-8 |
|
276
|
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
=head1 NAME |
|
278
|
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
Specio::Library::Path::Tiny - Path::Tiny types and coercions for Specio |
|
280
|
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
=head1 VERSION |
|
282
|
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
version 0.05 |
|
284
|
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
286
|
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
use Specio::Library::Path::Tiny; |
|
288
|
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
has path => ( isa => t('Path') ); |
|
290
|
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
292
|
|
|
|
|
|
|
|
|
293
|
|
|
|
|
|
|
This library provides a set of L<Path::Tiny> types and coercions for L<Specio>. |
|
294
|
|
|
|
|
|
|
These types can be used with L<Moose>, L<Moo>, L<Params::ValidationCompiler>, |
|
295
|
|
|
|
|
|
|
and other modules. |
|
296
|
|
|
|
|
|
|
|
|
297
|
|
|
|
|
|
|
=head1 TYPES |
|
298
|
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
This library provides the following types: |
|
300
|
|
|
|
|
|
|
|
|
301
|
|
|
|
|
|
|
=head2 Path |
|
302
|
|
|
|
|
|
|
|
|
303
|
|
|
|
|
|
|
A L<Path::Tiny> object. |
|
304
|
|
|
|
|
|
|
|
|
305
|
|
|
|
|
|
|
Will be coerced from a string or arrayref via C<Path::Tiny::path>. |
|
306
|
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
=head2 AbsPath |
|
308
|
|
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
A L<Path::Tiny> object where C<< $path->is_absolute >> returns true. |
|
310
|
|
|
|
|
|
|
|
|
311
|
|
|
|
|
|
|
Will be coerced from a string or arrayref via C<Path::Tiny::path> followed by |
|
312
|
|
|
|
|
|
|
call to C<< $path->absolute >>. |
|
313
|
|
|
|
|
|
|
|
|
314
|
|
|
|
|
|
|
=head2 RealPath |
|
315
|
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
A L<Path::Tiny> object where C<< $path->realpath eq $path >>. |
|
317
|
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
Will be coerced from a string or arrayref via C<Path::Tiny::path> followed by |
|
319
|
|
|
|
|
|
|
call to C<< $path->realpath >>. |
|
320
|
|
|
|
|
|
|
|
|
321
|
|
|
|
|
|
|
=head2 File |
|
322
|
|
|
|
|
|
|
|
|
323
|
|
|
|
|
|
|
A L<Path::Tiny> object which is a file on disk according to C<< $path->is_file |
|
324
|
|
|
|
|
|
|
>>. |
|
325
|
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
Will be coerced from a string or arrayref via C<Path::Tiny::path>. |
|
327
|
|
|
|
|
|
|
|
|
328
|
|
|
|
|
|
|
=head2 AbsFile |
|
329
|
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
A L<Path::Tiny> object which is a file on disk according to C<< $path->is_file |
|
331
|
|
|
|
|
|
|
>> where C<< $path->is_absolute >> returns true. |
|
332
|
|
|
|
|
|
|
|
|
333
|
|
|
|
|
|
|
Will be coerced from a string or arrayref via C<Path::Tiny::path> followed by |
|
334
|
|
|
|
|
|
|
call to C<< $path->absolute >>. |
|
335
|
|
|
|
|
|
|
|
|
336
|
|
|
|
|
|
|
=head2 RealFile |
|
337
|
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
A L<Path::Tiny> object which is a file on disk according to C<< $path->is_file |
|
339
|
|
|
|
|
|
|
>> where C<< $path->realpath eq $path >>. |
|
340
|
|
|
|
|
|
|
|
|
341
|
|
|
|
|
|
|
Will be coerced from a string or arrayref via C<Path::Tiny::path> followed by |
|
342
|
|
|
|
|
|
|
call to C<< $path->realpath >>. |
|
343
|
|
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
=head2 Dir |
|
345
|
|
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
A L<Path::Tiny> object which is a directory on disk according to C<< |
|
347
|
|
|
|
|
|
|
$path->is_dir >>. |
|
348
|
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
Will be coerced from a string or arrayref via C<Path::Tiny::path>. |
|
350
|
|
|
|
|
|
|
|
|
351
|
|
|
|
|
|
|
=head2 AbsDir |
|
352
|
|
|
|
|
|
|
|
|
353
|
|
|
|
|
|
|
A L<Path::Tiny> object which is a directory on disk according to C<< |
|
354
|
|
|
|
|
|
|
$path->is_dir >> where C<< $path->is_absolute >> returns true. |
|
355
|
|
|
|
|
|
|
|
|
356
|
|
|
|
|
|
|
Will be coerced from a string or arrayref via C<Path::Tiny::path> followed by |
|
357
|
|
|
|
|
|
|
call to C<< $path->absolute >>. |
|
358
|
|
|
|
|
|
|
|
|
359
|
|
|
|
|
|
|
=head2 RealDir |
|
360
|
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
A L<Path::Tiny> object which is a directory on disk according to C<< |
|
362
|
|
|
|
|
|
|
$path->is_dir >> where C<< $path->realpath eq $path >>. |
|
363
|
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
Will be coerced from a string or arrayref via C<Path::Tiny::path> followed by |
|
365
|
|
|
|
|
|
|
call to C<< $path->realpath >>. |
|
366
|
|
|
|
|
|
|
|
|
367
|
|
|
|
|
|
|
=head1 CREDITS |
|
368
|
|
|
|
|
|
|
|
|
369
|
|
|
|
|
|
|
The vast majority of the code in this distribution comes from David Golden's |
|
370
|
|
|
|
|
|
|
L<Types::Path::Tiny> distribution. |
|
371
|
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
=head1 SUPPORT |
|
373
|
|
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
Bugs may be submitted at L<https://github.com/houseabsolute/Specio-Library-Path-Tiny/issues>. |
|
375
|
|
|
|
|
|
|
|
|
376
|
|
|
|
|
|
|
=head1 SOURCE |
|
377
|
|
|
|
|
|
|
|
|
378
|
|
|
|
|
|
|
The source code repository for Specio-Library-Path-Tiny can be found at L<https://github.com/houseabsolute/Specio-Library-Path-Tiny>. |
|
379
|
|
|
|
|
|
|
|
|
380
|
|
|
|
|
|
|
=head1 DONATIONS |
|
381
|
|
|
|
|
|
|
|
|
382
|
|
|
|
|
|
|
If you'd like to thank me for the work I've done on this module, please |
|
383
|
|
|
|
|
|
|
consider making a "donation" to me via PayPal. I spend a lot of free time |
|
384
|
|
|
|
|
|
|
creating free software, and would appreciate any support you'd care to offer. |
|
385
|
|
|
|
|
|
|
|
|
386
|
|
|
|
|
|
|
Please note that B<I am not suggesting that you must do this> in order for me |
|
387
|
|
|
|
|
|
|
to continue working on this particular software. I will continue to do so, |
|
388
|
|
|
|
|
|
|
inasmuch as I have in the past, for as long as it interests me. |
|
389
|
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
Similarly, a donation made in this way will probably not make me work on this |
|
391
|
|
|
|
|
|
|
software much more, unless I get so many donations that I can consider working |
|
392
|
|
|
|
|
|
|
on free software full time (let's all have a chuckle at that together). |
|
393
|
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
To donate, log into PayPal and send money to autarch@urth.org, or use the |
|
395
|
|
|
|
|
|
|
button at L<https://www.urth.org/fs-donation.html>. |
|
396
|
|
|
|
|
|
|
|
|
397
|
|
|
|
|
|
|
=head1 AUTHOR |
|
398
|
|
|
|
|
|
|
|
|
399
|
|
|
|
|
|
|
Dave Rolsky <autarch@urth.org> |
|
400
|
|
|
|
|
|
|
|
|
401
|
|
|
|
|
|
|
=head1 CONTRIBUTOR |
|
402
|
|
|
|
|
|
|
|
|
403
|
|
|
|
|
|
|
=for stopwords Paulo Custodio |
|
404
|
|
|
|
|
|
|
|
|
405
|
|
|
|
|
|
|
Paulo Custodio <pauloscustodio@gmail.com> |
|
406
|
|
|
|
|
|
|
|
|
407
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
408
|
|
|
|
|
|
|
|
|
409
|
|
|
|
|
|
|
This software is Copyright (c) 2016 - 2022 by Dave Rolsky. |
|
410
|
|
|
|
|
|
|
|
|
411
|
|
|
|
|
|
|
This is free software, licensed under: |
|
412
|
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
The Apache License, Version 2.0, January 2004 |
|
414
|
|
|
|
|
|
|
|
|
415
|
|
|
|
|
|
|
The full text of the license can be found in the |
|
416
|
|
|
|
|
|
|
F<LICENSE> file included with this distribution. |
|
417
|
|
|
|
|
|
|
|
|
418
|
|
|
|
|
|
|
=cut |