line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Toader::Render::Entry::Cleanup; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
20484
|
use warnings; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
141
|
|
4
|
4
|
|
|
4
|
|
21
|
use strict; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
98
|
|
5
|
4
|
|
|
4
|
|
21
|
use base 'Error::Helper'; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
1002
|
|
6
|
4
|
|
|
4
|
|
1334
|
use Toader::pathHelper; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
5339
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Toader::Render::Entry::Cleanup - This is used for cleaning up the output directory prior to rendering. |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 VERSION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Version 0.1.0 |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=cut |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
our $VERSION = '0.1.0'; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 SYNOPSIS |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 METHODS |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head2 new |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
This initiates the object. |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
One argument is required and it is a L object. |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
my $foo=Toader::Render::Entry::Cleanup->new($toader); |
31
|
|
|
|
|
|
|
if($foo->error){ |
32
|
|
|
|
|
|
|
warn('error: '.$foo->error.":".$foo->errorString); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=cut |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub new{ |
38
|
0
|
|
|
0
|
1
|
|
my $toader=$_[1]; |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
|
|
|
my $self={ |
41
|
|
|
|
|
|
|
error=>undef, |
42
|
|
|
|
|
|
|
errorString=>'', |
43
|
|
|
|
|
|
|
perror=>undef, |
44
|
|
|
|
|
|
|
errorExtra=>{ |
45
|
|
|
|
|
|
|
flags=>{ |
46
|
|
|
|
|
|
|
1=>'noToaderObj', |
47
|
|
|
|
|
|
|
2=>'notAtoaderObj', |
48
|
|
|
|
|
|
|
3=>'toaderPerror', |
49
|
|
|
|
|
|
|
4=>'notAdirectoryObj', |
50
|
|
|
|
|
|
|
5=>'noObj', |
51
|
|
|
|
|
|
|
6=>'noOutputDirSet', |
52
|
|
|
|
|
|
|
7=>'outputDirDoesNotExist', |
53
|
|
|
|
|
|
|
8=>'objPerror', |
54
|
|
|
|
|
|
|
9=>'noDirSet', |
55
|
|
|
|
|
|
|
10=>'pathhelperErrored', |
56
|
|
|
|
|
|
|
11=>'outputCleanupFailed', |
57
|
|
|
|
|
|
|
}, |
58
|
|
|
|
|
|
|
}, |
59
|
|
|
|
|
|
|
}; |
60
|
0
|
|
|
|
|
|
bless $self; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
#make sure something passed to this method |
63
|
0
|
0
|
|
|
|
|
if ( ! defined( $toader ) ){ |
64
|
0
|
|
|
|
|
|
$self->{error}=1; |
65
|
0
|
|
|
|
|
|
$self->{errorString}='No Toader object passed'; |
66
|
0
|
|
|
|
|
|
$self->{perror}=1; |
67
|
0
|
|
|
|
|
|
$self->warn; |
68
|
0
|
|
|
|
|
|
return $self; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
#makes sure the object passed is a Toader object |
72
|
0
|
0
|
|
|
|
|
if ( ref( $toader ) ne 'Toader' ){ |
73
|
0
|
|
|
|
|
|
$self->{error}=2; |
74
|
0
|
|
|
|
|
|
$self->{errorString}='The passed object is not a Toader object, but a "' |
75
|
|
|
|
|
|
|
.ref( $toader ).'"'; |
76
|
0
|
|
|
|
|
|
$self->{perror}=1; |
77
|
0
|
|
|
|
|
|
$self->warn; |
78
|
0
|
|
|
|
|
|
return $self; |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
#makes sure the toader object is not in a permanent error state |
82
|
0
|
|
|
|
|
|
$toader->errorblank; |
83
|
0
|
0
|
|
|
|
|
if ( $toader->error ){ |
84
|
0
|
|
|
|
|
|
$self->{perror}=1; |
85
|
0
|
|
|
|
|
|
$self->{error}=3; |
86
|
0
|
|
|
|
|
|
$self->{errorString}='The Toader object passed has a permanent error set. error="'. |
87
|
|
|
|
|
|
|
$toader->error.'" errorString="'.$toader->errorString.'"'; |
88
|
0
|
|
|
|
|
|
$self->warn; |
89
|
0
|
|
|
|
|
|
return $self; |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
|
92
|
0
|
|
|
|
|
|
$self->{toader}=$toader; |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
#makes sure a output directory is set |
95
|
0
|
|
|
|
|
|
my $outputdir=$self->{toader}->getOutputDir; |
96
|
0
|
0
|
|
|
|
|
if( ! defined( $outputdir ) ){ |
97
|
0
|
|
|
|
|
|
$self->{error}=6; |
98
|
0
|
|
|
|
|
|
$self->{errorString}='The Toader object has not had a output directory set'; |
99
|
0
|
|
|
|
|
|
$self->warn; |
100
|
0
|
|
|
|
|
|
return $self; |
101
|
|
|
|
|
|
|
} |
102
|
0
|
|
|
|
|
|
$self->{outputdir}=$outputdir; |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
#make sure the output directory exists |
105
|
0
|
0
|
|
|
|
|
if( ! -d $outputdir ){ |
106
|
0
|
|
|
|
|
|
$self->{error}=7; |
107
|
0
|
|
|
|
|
|
$self->{errorString}='The output directory does not exist or does not appear to be a directory'; |
108
|
0
|
|
|
|
|
|
$self->warn; |
109
|
0
|
|
|
|
|
|
return $self; |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
#gets the pathhelper for later usage |
113
|
0
|
|
|
|
|
|
$self->{pathhelper}=$self->{toader}->getPathHelper; |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
|
117
|
0
|
|
|
|
|
|
return $self; |
118
|
|
|
|
|
|
|
} |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=head2 cleanup |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
This cleans up the output directory for a specified object. |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
One argument is taken and that is the object to be cleaned from |
125
|
|
|
|
|
|
|
the output directory. |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
$foo->cleanup( $obj ); |
128
|
|
|
|
|
|
|
if($foo->error){ |
129
|
|
|
|
|
|
|
warn('error: '.$foo->error.":".$foo->errorString); |
130
|
|
|
|
|
|
|
} |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=cut |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
sub cleanup{ |
135
|
0
|
|
|
0
|
1
|
|
my $self=$_[0]; |
136
|
0
|
|
|
|
|
|
my $obj=$_[1]; |
137
|
|
|
|
|
|
|
|
138
|
0
|
0
|
|
|
|
|
if (!$self->errorblank){ |
139
|
0
|
|
|
|
|
|
return undef; |
140
|
|
|
|
|
|
|
} |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
#make sure a object was passed |
143
|
0
|
0
|
|
|
|
|
if ( ! defined( $obj ) ){ |
144
|
0
|
|
|
|
|
|
$self->{error}=5; |
145
|
0
|
|
|
|
|
|
$self->{errorString}='No object passed'; |
146
|
0
|
|
|
|
|
|
$self->warn; |
147
|
0
|
|
|
|
|
|
return $self; |
148
|
|
|
|
|
|
|
} |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
#make sure it is a supported type |
151
|
0
|
0
|
|
|
|
|
if ( ref( $obj) ne 'Toader::Entry' ){ |
152
|
0
|
|
|
|
|
|
$self->{error}=4; |
153
|
0
|
|
|
|
|
|
$self->{errorString}='"'.ref( $obj ).'" is not a Toader::Entry object'; |
154
|
0
|
|
|
|
|
|
$self->warn; |
155
|
0
|
|
|
|
|
|
return $self; |
156
|
|
|
|
|
|
|
} |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
#make sure a permanent error is not set |
159
|
0
|
|
|
|
|
|
$obj->errorblank; |
160
|
0
|
0
|
|
|
|
|
if( $obj->error ){ |
161
|
0
|
|
|
|
|
|
$self->{error}=8; |
162
|
0
|
|
|
|
|
|
$self->{errorString}='The object error has a permanent error set. error="' |
163
|
|
|
|
|
|
|
.$obj->error.'" errorString="'.$obj->errorString.'"'; |
164
|
0
|
|
|
|
|
|
$self->warn; |
165
|
0
|
|
|
|
|
|
return undef; |
166
|
|
|
|
|
|
|
} |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
#gets the directory |
169
|
0
|
|
|
|
|
|
my $dir=$obj->dirGet; |
170
|
0
|
0
|
|
|
|
|
if ( ! defined( $dir ) ){ |
171
|
0
|
|
|
|
|
|
$self->{error}=9; |
172
|
0
|
|
|
|
|
|
$self->{errorString}='The object has not had a directory set for it'; |
173
|
0
|
|
|
|
|
|
$self->warn; |
174
|
0
|
|
|
|
|
|
return undef; |
175
|
|
|
|
|
|
|
} |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
#puts together the base directory |
178
|
0
|
|
|
|
|
|
$dir=$self->{outputdir}.'/'.$self->{pathhelper}->relative2root($dir).'/'; |
179
|
0
|
0
|
|
|
|
|
if( $self->{pathhelper}->error ){ |
180
|
0
|
|
|
|
|
|
$self->{error}=10; |
181
|
|
|
|
|
|
|
$self->{errorString}='Toader::pathHelper errored. error="'. |
182
|
|
|
|
|
|
|
$self->{pathhelper}->error.'" errorString="'. |
183
|
0
|
|
|
|
|
|
$self->{pathhelper}->errorString.'"'; |
184
|
0
|
|
|
|
|
|
$self->warn; |
185
|
0
|
|
|
|
|
|
return undef; |
186
|
|
|
|
|
|
|
} |
187
|
0
|
|
|
|
|
|
$dir=$dir.'.entries/'.$obj->entryNameGet.'/'; |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
# if it does not exist, there is no reason to clean it |
190
|
0
|
0
|
|
|
|
|
if ( ! -e $dir ){ |
191
|
0
|
|
|
|
|
|
return 1; |
192
|
|
|
|
|
|
|
} |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
#a list of files that could not be removed |
195
|
0
|
|
|
|
|
|
my @failed; |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
#tries to remove the index file |
198
|
0
|
|
|
|
|
|
my $index=$dir.'index.html'; |
199
|
0
|
|
|
|
|
|
my $indexNotAfile=0; |
200
|
0
|
0
|
|
|
|
|
if ( -f $index ){ |
201
|
0
|
0
|
|
|
|
|
if( ! unlink( $index ) ){ |
202
|
0
|
|
|
|
|
|
push( @failed, $index ); |
203
|
|
|
|
|
|
|
} |
204
|
|
|
|
|
|
|
}else{ |
205
|
0
|
0
|
|
|
|
|
if ( -e $index ){ |
206
|
0
|
|
|
|
|
|
$indexNotAfile=1; |
207
|
0
|
|
|
|
|
|
push( @failed, $index ); |
208
|
|
|
|
|
|
|
} |
209
|
|
|
|
|
|
|
} |
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
#tries to remove the attached files |
212
|
0
|
|
|
|
|
|
my $filesdir=$dir.'.files/'; |
213
|
0
|
|
|
|
|
|
my @files; |
214
|
|
|
|
|
|
|
my $dh; |
215
|
0
|
|
|
|
|
|
my $openFilesdirFailed=0; |
216
|
0
|
0
|
|
|
|
|
if (! opendir( $dh, $filesdir ) ){ |
217
|
0
|
|
|
|
|
|
$openFilesdirFailed=0; |
218
|
|
|
|
|
|
|
}else{ |
219
|
0
|
|
|
|
|
|
@files=readdir( $dh ); |
220
|
0
|
|
|
|
|
|
closedir( $dh ); |
221
|
|
|
|
|
|
|
} |
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
#removes each file |
224
|
0
|
|
|
|
|
|
my $int=0; |
225
|
0
|
|
|
|
|
|
my $foundAnonFile=0; |
226
|
0
|
|
|
|
|
|
my @nonfiles; |
227
|
0
|
|
|
|
|
|
while ( defined( $files[$int] ) ){ |
228
|
0
|
|
|
|
|
|
my $path=$filesdir.$files[$int]; |
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
#determines if it should be skipped |
231
|
0
|
|
|
|
|
|
my $skip=0; |
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
#skips .. or . |
234
|
0
|
0
|
0
|
|
|
|
if ( |
235
|
|
|
|
|
|
|
( $files[$int] ne '.' ) || |
236
|
|
|
|
|
|
|
( $files[$int] ne '..' ) |
237
|
|
|
|
|
|
|
){ |
238
|
0
|
|
|
|
|
|
$skip=1; |
239
|
|
|
|
|
|
|
} |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
#skip non-files |
242
|
0
|
0
|
0
|
|
|
|
if ( |
243
|
|
|
|
|
|
|
( ! $skip ) && |
244
|
|
|
|
|
|
|
( ! -f $path ) |
245
|
|
|
|
|
|
|
){ |
246
|
0
|
|
|
|
|
|
$skip=1; |
247
|
0
|
|
|
|
|
|
push( @nonfiles, $path ); |
248
|
|
|
|
|
|
|
} |
249
|
|
|
|
|
|
|
|
250
|
0
|
0
|
|
|
|
|
if ( ! $skip ){ |
251
|
0
|
0
|
|
|
|
|
if( ! unlink( $path) ){ |
252
|
0
|
|
|
|
|
|
push( @failed, $path ); |
253
|
|
|
|
|
|
|
} |
254
|
|
|
|
|
|
|
} |
255
|
|
|
|
|
|
|
|
256
|
0
|
|
|
|
|
|
$int++; |
257
|
|
|
|
|
|
|
} |
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
#removes the files directory |
260
|
0
|
|
|
|
|
|
my $fileDirRMfailed=0; |
261
|
0
|
0
|
0
|
|
|
|
if( |
262
|
|
|
|
|
|
|
( ! defined( $nonfiles[0] ) ) || |
263
|
|
|
|
|
|
|
( ! defined( $failed[0] ) ) |
264
|
|
|
|
|
|
|
){ |
265
|
0
|
0
|
|
|
|
|
if( ! rmdir $filesdir ){ |
266
|
0
|
|
|
|
|
|
$fileDirRMfailed=1; |
267
|
|
|
|
|
|
|
}; |
268
|
|
|
|
|
|
|
} |
269
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
#checks to see if the obj directory can be removed and if so remove it |
272
|
0
|
|
|
|
|
|
my $objDirRMfailed=0; |
273
|
0
|
0
|
|
|
|
|
if ( ! -e $filesdir ){ |
274
|
0
|
0
|
|
|
|
|
if (! opendir( $dh, $dir ) ){ |
275
|
0
|
|
|
|
|
|
$openFilesdirFailed=0; |
276
|
|
|
|
|
|
|
}else{ |
277
|
0
|
|
|
|
|
|
@files=readdir( $dh ); |
278
|
0
|
|
|
|
|
|
closedir( $dh ); |
279
|
|
|
|
|
|
|
} |
280
|
|
|
|
|
|
|
|
281
|
0
|
0
|
|
|
|
|
if (opendir( $dh, $filesdir ) ){ |
282
|
0
|
|
|
|
|
|
@files=readdir( $dh ); |
283
|
0
|
|
|
|
|
|
closedir( $dh ); |
284
|
|
|
|
|
|
|
} |
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
#make sure there are no surprises in the file directory |
287
|
0
|
|
|
|
|
|
$int=0; |
288
|
0
|
|
|
|
|
|
my $rmObjDir=1; |
289
|
0
|
|
|
|
|
|
while ( defined( $files[$int] ) ){ |
290
|
0
|
0
|
0
|
|
|
|
if ( |
|
|
|
0
|
|
|
|
|
291
|
|
|
|
|
|
|
( |
292
|
|
|
|
|
|
|
( $files[$int] ne '.' ) && |
293
|
|
|
|
|
|
|
( $files[$int] ne '..' ) |
294
|
|
|
|
|
|
|
) && |
295
|
|
|
|
|
|
|
( ! -f $dir.'/'.$files[$int] ) |
296
|
|
|
|
|
|
|
){ |
297
|
|
|
|
|
|
|
|
298
|
0
|
|
|
|
|
|
$rmObjDir=0; |
299
|
|
|
|
|
|
|
} |
300
|
|
|
|
|
|
|
|
301
|
0
|
|
|
|
|
|
$int++; |
302
|
|
|
|
|
|
|
} |
303
|
|
|
|
|
|
|
|
304
|
0
|
0
|
|
|
|
|
if ( $rmObjDir ){ |
305
|
0
|
0
|
|
|
|
|
if ( -e $dir ){ |
306
|
0
|
0
|
|
|
|
|
if ( ! rmdir( $dir ) ){ |
307
|
0
|
|
|
|
|
|
$objDirRMfailed=1; |
308
|
|
|
|
|
|
|
} |
309
|
|
|
|
|
|
|
} |
310
|
|
|
|
|
|
|
} |
311
|
|
|
|
|
|
|
|
312
|
|
|
|
|
|
|
} |
313
|
|
|
|
|
|
|
|
314
|
|
|
|
|
|
|
#handles it if it errored |
315
|
0
|
0
|
0
|
|
|
|
if( |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
316
|
|
|
|
|
|
|
defined( $nonfiles[0] )|| |
317
|
|
|
|
|
|
|
$openFilesdirFailed || |
318
|
|
|
|
|
|
|
$indexNotAfile || |
319
|
|
|
|
|
|
|
$fileDirRMfailed || |
320
|
|
|
|
|
|
|
$objDirRMfailed || |
321
|
|
|
|
|
|
|
defined( $failed[0] ) |
322
|
|
|
|
|
|
|
){ |
323
|
|
|
|
|
|
|
|
324
|
0
|
|
|
|
|
|
my $error=''; |
325
|
|
|
|
|
|
|
|
326
|
0
|
0
|
|
|
|
|
if ( $indexNotAfile ){ |
327
|
0
|
|
|
|
|
|
$error='The index file, "'.$index.'", could not be removed. '; |
328
|
|
|
|
|
|
|
} |
329
|
|
|
|
|
|
|
|
330
|
0
|
0
|
|
|
|
|
if ( $openFilesdirFailed ){ |
331
|
0
|
|
|
|
|
|
$error=$error.'Could not open the files directory for reading '; |
332
|
|
|
|
|
|
|
} |
333
|
|
|
|
|
|
|
|
334
|
0
|
0
|
|
|
|
|
if ( $fileDirRMfailed ){ |
335
|
0
|
|
|
|
|
|
$error=$error.'Failed to remove the files directory, "'.$filesdir.'". '; |
336
|
|
|
|
|
|
|
} |
337
|
|
|
|
|
|
|
|
338
|
0
|
0
|
|
|
|
|
if ( $objDirRMfailed ){ |
339
|
0
|
|
|
|
|
|
$error=$error.'Failed to remove the object directory, "'.$dir.'".'; |
340
|
|
|
|
|
|
|
} |
341
|
|
|
|
|
|
|
|
342
|
0
|
|
|
|
|
|
my $int=0; |
343
|
|
|
|
|
|
|
|
344
|
0
|
0
|
|
|
|
|
if ( defined( $nonfiles[0] ) ){ |
345
|
0
|
|
|
|
|
|
$error=$error.'Some none files were found... '; |
346
|
0
|
|
|
|
|
|
while ( defined( $nonfiles[$int] ) ){ |
347
|
0
|
|
|
|
|
|
$error=$error.'"'.$nonfiles[$int].'" '; |
348
|
|
|
|
|
|
|
|
349
|
0
|
|
|
|
|
|
$int++; |
350
|
|
|
|
|
|
|
} |
351
|
|
|
|
|
|
|
} |
352
|
|
|
|
|
|
|
|
353
|
0
|
0
|
|
|
|
|
if ( defined( $failed[0] ) ){ |
354
|
0
|
|
|
|
|
|
$error=$error.'Some files could not be removed... '; |
355
|
0
|
|
|
|
|
|
$int=0; |
356
|
0
|
|
|
|
|
|
while ( defined( $failed[$int] ) ){ |
357
|
0
|
|
|
|
|
|
$error=$error.'"'.$failed[$int].'" '; |
358
|
|
|
|
|
|
|
|
359
|
0
|
|
|
|
|
|
$int++; |
360
|
|
|
|
|
|
|
} |
361
|
|
|
|
|
|
|
} |
362
|
|
|
|
|
|
|
|
363
|
0
|
|
|
|
|
|
$self->{error}=11; |
364
|
0
|
|
|
|
|
|
$self->{errorString}=$error; |
365
|
0
|
|
|
|
|
|
$self->warn; |
366
|
0
|
|
|
|
|
|
return undef; |
367
|
|
|
|
|
|
|
} |
368
|
|
|
|
|
|
|
|
369
|
0
|
|
|
|
|
|
return 1; |
370
|
|
|
|
|
|
|
} |
371
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
=head1 ERROR CODES |
373
|
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
=head2 1, noToaderObj |
375
|
|
|
|
|
|
|
|
376
|
|
|
|
|
|
|
No L object passed. |
377
|
|
|
|
|
|
|
|
378
|
|
|
|
|
|
|
=head2 2, notAtoaderObj |
379
|
|
|
|
|
|
|
|
380
|
|
|
|
|
|
|
The passed object is not a L object. |
381
|
|
|
|
|
|
|
|
382
|
|
|
|
|
|
|
=head2 3, toaderPerror |
383
|
|
|
|
|
|
|
|
384
|
|
|
|
|
|
|
The L object passed has a permanent error set. |
385
|
|
|
|
|
|
|
|
386
|
|
|
|
|
|
|
=head2 4, notAdirectoryObj |
387
|
|
|
|
|
|
|
|
388
|
|
|
|
|
|
|
The passed object is not a L object. |
389
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
=head2 5, noObj |
391
|
|
|
|
|
|
|
|
392
|
|
|
|
|
|
|
No object passed. |
393
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
=head2 6, noOutputDirSet |
395
|
|
|
|
|
|
|
|
396
|
|
|
|
|
|
|
The L object has not had a output directory set. |
397
|
|
|
|
|
|
|
|
398
|
|
|
|
|
|
|
=head2 7, outputDirDoesNotExist |
399
|
|
|
|
|
|
|
|
400
|
|
|
|
|
|
|
The output directory does not appear to exist or is not a directory. |
401
|
|
|
|
|
|
|
|
402
|
|
|
|
|
|
|
=head2 8, objPerror |
403
|
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
The object has a permanent error set. |
405
|
|
|
|
|
|
|
|
406
|
|
|
|
|
|
|
=head2 9, noDirSet |
407
|
|
|
|
|
|
|
|
408
|
|
|
|
|
|
|
The object has not had a directory set for it. |
409
|
|
|
|
|
|
|
|
410
|
|
|
|
|
|
|
=head2 10, pathhelperErrored |
411
|
|
|
|
|
|
|
|
412
|
|
|
|
|
|
|
L errored. |
413
|
|
|
|
|
|
|
|
414
|
|
|
|
|
|
|
=head2 11, outputCleanupFailed |
415
|
|
|
|
|
|
|
|
416
|
|
|
|
|
|
|
Failed cleaning up the output directory. |
417
|
|
|
|
|
|
|
|
418
|
|
|
|
|
|
|
=head1 AUTHOR |
419
|
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
Zane C. Bowers-Hadley, C<< >> |
421
|
|
|
|
|
|
|
|
422
|
|
|
|
|
|
|
=head1 BUGS |
423
|
|
|
|
|
|
|
|
424
|
|
|
|
|
|
|
Please report any bugs or feature requests to C, or through |
425
|
|
|
|
|
|
|
the web interface at L. I will be notified, and then you'll |
426
|
|
|
|
|
|
|
automatically be notified of progress on your bug as I make changes. |
427
|
|
|
|
|
|
|
|
428
|
|
|
|
|
|
|
|
429
|
|
|
|
|
|
|
|
430
|
|
|
|
|
|
|
|
431
|
|
|
|
|
|
|
=head1 SUPPORT |
432
|
|
|
|
|
|
|
|
433
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
434
|
|
|
|
|
|
|
|
435
|
|
|
|
|
|
|
perldoc Toader::Render::Entry::Cleanup |
436
|
|
|
|
|
|
|
|
437
|
|
|
|
|
|
|
You can also look for information at: |
438
|
|
|
|
|
|
|
|
439
|
|
|
|
|
|
|
=over 4 |
440
|
|
|
|
|
|
|
|
441
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker |
442
|
|
|
|
|
|
|
|
443
|
|
|
|
|
|
|
L |
444
|
|
|
|
|
|
|
|
445
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
446
|
|
|
|
|
|
|
|
447
|
|
|
|
|
|
|
L |
448
|
|
|
|
|
|
|
|
449
|
|
|
|
|
|
|
=item * CPAN Ratings |
450
|
|
|
|
|
|
|
|
451
|
|
|
|
|
|
|
L |
452
|
|
|
|
|
|
|
|
453
|
|
|
|
|
|
|
=item * Search CPAN |
454
|
|
|
|
|
|
|
|
455
|
|
|
|
|
|
|
L |
456
|
|
|
|
|
|
|
|
457
|
|
|
|
|
|
|
=back |
458
|
|
|
|
|
|
|
|
459
|
|
|
|
|
|
|
|
460
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
461
|
|
|
|
|
|
|
|
462
|
|
|
|
|
|
|
|
463
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
464
|
|
|
|
|
|
|
|
465
|
|
|
|
|
|
|
Copyright 2013. Zane C. Bowers-Hadley. |
466
|
|
|
|
|
|
|
|
467
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
468
|
|
|
|
|
|
|
under the terms of either: the GNU General Public License as published |
469
|
|
|
|
|
|
|
by the Free Software Foundation; or the Artistic License. |
470
|
|
|
|
|
|
|
|
471
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information. |
472
|
|
|
|
|
|
|
|
473
|
|
|
|
|
|
|
|
474
|
|
|
|
|
|
|
=cut |
475
|
|
|
|
|
|
|
|
476
|
|
|
|
|
|
|
1; # End of Toader::Render::Entry::Cleanup |