line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Toader::Render::Directory::Cleanup; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
25145
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
5
|
1
|
|
|
1
|
|
5
|
use base 'Error::Helper'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
732
|
|
6
|
1
|
|
|
1
|
|
1446
|
use Toader::pathHelper; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
1198
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Toader::Render::Directory::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::Directory::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=>'cleanupFailed', |
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 undef; |
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 undef; |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
#gets the pathhelper for later usage |
113
|
0
|
|
|
|
|
|
$self->{pathhelper}=$self->{toader}->getPathHelper; |
114
|
|
|
|
|
|
|
|
115
|
0
|
|
|
|
|
|
return $self; |
116
|
|
|
|
|
|
|
} |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head2 cleanup |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
This cleans up the output directory for a specified object. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
One argument is taken and that is the L to be |
123
|
|
|
|
|
|
|
cleaned from the output directory. |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
$foo->cleanup( $obj ); |
126
|
|
|
|
|
|
|
if($foo->error){ |
127
|
|
|
|
|
|
|
warn('error: '.$foo->error.":".$foo->errorString); |
128
|
|
|
|
|
|
|
} |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=cut |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
sub cleanup{ |
133
|
0
|
|
|
0
|
1
|
|
my $self=$_[0]; |
134
|
0
|
|
|
|
|
|
my $obj=$_[1]; |
135
|
|
|
|
|
|
|
|
136
|
0
|
0
|
|
|
|
|
if (!$self->errorblank){ |
137
|
0
|
|
|
|
|
|
return undef; |
138
|
|
|
|
|
|
|
} |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
#make sure a object was passed |
141
|
0
|
0
|
|
|
|
|
if ( ! defined( $obj ) ){ |
142
|
0
|
|
|
|
|
|
$self->{error}=5; |
143
|
0
|
|
|
|
|
|
$self->{errorString}='No object passed'; |
144
|
0
|
|
|
|
|
|
$self->warn; |
145
|
0
|
|
|
|
|
|
return $self; |
146
|
|
|
|
|
|
|
} |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
#make sure it is a supported type |
149
|
0
|
0
|
|
|
|
|
if ( ref( $obj) ne 'Toader::Directory' |
150
|
|
|
|
|
|
|
){ |
151
|
0
|
|
|
|
|
|
$self->{error}=4; |
152
|
0
|
|
|
|
|
|
$self->{errorString}='"'.ref( $obj ).'" is not a Toader::Directory object'; |
153
|
0
|
|
|
|
|
|
$self->warn; |
154
|
0
|
|
|
|
|
|
return $self; |
155
|
|
|
|
|
|
|
} |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
#make sure a permanent error is not set |
158
|
0
|
|
|
|
|
|
$obj->errorblank; |
159
|
0
|
0
|
|
|
|
|
if( $obj->error ){ |
160
|
0
|
|
|
|
|
|
$self->{error}=8; |
161
|
0
|
|
|
|
|
|
$self->{errorString}='The object error has a permanent error set. error="' |
162
|
|
|
|
|
|
|
.$obj->error.'" errorString="'.$obj->errorString.'"'; |
163
|
0
|
|
|
|
|
|
$self->warn; |
164
|
0
|
|
|
|
|
|
return undef; |
165
|
|
|
|
|
|
|
} |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
#gets the directory |
168
|
0
|
|
|
|
|
|
my $dir=$obj->dirGet; |
169
|
0
|
0
|
|
|
|
|
if ( ! defined( $dir ) ){ |
170
|
0
|
|
|
|
|
|
$self->{error}=9; |
171
|
0
|
|
|
|
|
|
$self->{errorString}='The object has not had a directory set for it'; |
172
|
0
|
|
|
|
|
|
$self->warn; |
173
|
0
|
|
|
|
|
|
return undef; |
174
|
|
|
|
|
|
|
} |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
#puts together the base directory |
177
|
0
|
|
|
|
|
|
$dir=$self->{outputdir}.'/'.$self->{pathhelper}->relative2root($dir).'/'; |
178
|
0
|
0
|
|
|
|
|
if( $self->{pathhelper}->error ){ |
179
|
0
|
|
|
|
|
|
$self->{error}=10; |
180
|
|
|
|
|
|
|
$self->{errorString}='Toader::pathHelper errored. error="'. |
181
|
|
|
|
|
|
|
$self->{pathhelper}->error.'" errorString="'. |
182
|
0
|
|
|
|
|
|
$self->{pathhelper}->errorString.'"'; |
183
|
0
|
|
|
|
|
|
$self->warn; |
184
|
0
|
|
|
|
|
|
return undef; |
185
|
|
|
|
|
|
|
} |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
#it does not exist so no reason to do further checks |
188
|
0
|
0
|
|
|
|
|
if ( ! -e $dir ){ |
189
|
0
|
|
|
|
|
|
return 1; |
190
|
|
|
|
|
|
|
} |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
#a list of files that could not be removed |
193
|
0
|
|
|
|
|
|
my @failed; |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
#tries to remove the index file |
196
|
0
|
|
|
|
|
|
my $index=$dir.'index.html'; |
197
|
0
|
|
|
|
|
|
my $indexNotAfile=0; |
198
|
0
|
0
|
|
|
|
|
if ( -f $index ){ |
199
|
0
|
0
|
|
|
|
|
if( ! unlink( $index ) ){ |
200
|
0
|
|
|
|
|
|
push( @failed, $index ); |
201
|
|
|
|
|
|
|
} |
202
|
|
|
|
|
|
|
}else{ |
203
|
0
|
0
|
|
|
|
|
if ( -e $index ){ |
204
|
0
|
|
|
|
|
|
$indexNotAfile=1; |
205
|
0
|
|
|
|
|
|
push( @failed, $index ); |
206
|
|
|
|
|
|
|
} |
207
|
|
|
|
|
|
|
} |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
#tries to remove the attached files |
210
|
0
|
|
|
|
|
|
my $filesdir=$dir.'.files/'; |
211
|
0
|
|
|
|
|
|
my @files; |
212
|
|
|
|
|
|
|
my $dh; |
213
|
0
|
|
|
|
|
|
my $openFilesdirFailed=0; |
214
|
0
|
0
|
|
|
|
|
if (! opendir( $dh, $filesdir ) ){ |
215
|
0
|
0
|
|
|
|
|
if ( ! -e $filesdir ){ |
216
|
0
|
|
|
|
|
|
$openFilesdirFailed=0; |
217
|
|
|
|
|
|
|
} |
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] eq '.' ) || |
236
|
|
|
|
|
|
|
( $files[$int] eq '..' ) |
237
|
|
|
|
|
|
|
){ |
238
|
0
|
|
|
|
|
|
$skip=1; |
239
|
|
|
|
|
|
|
} |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
#skip non-files |
242
|
0
|
0
|
0
|
|
|
|
if ( |
243
|
|
|
|
|
|
|
( ! -f $path ) && |
244
|
|
|
|
|
|
|
( ! $skip ) |
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
|
0
|
|
|
|
if( |
266
|
|
|
|
|
|
|
( -e $filesdir ) && |
267
|
|
|
|
|
|
|
( ! rmdir $filesdir ) |
268
|
|
|
|
|
|
|
){ |
269
|
0
|
|
|
|
|
|
$fileDirRMfailed=1; |
270
|
|
|
|
|
|
|
}; |
271
|
|
|
|
|
|
|
} |
272
|
|
|
|
|
|
|
|
273
|
|
|
|
|
|
|
#checks to see if the obj directory can be removed and if so remove it |
274
|
0
|
|
|
|
|
|
my $objDirRMfailed=0; |
275
|
0
|
0
|
|
|
|
|
if ( ! -e $filesdir ){ |
276
|
0
|
0
|
|
|
|
|
if (! opendir( $dh, $dir ) ){ |
277
|
0
|
|
|
|
|
|
$openFilesdirFailed=0; |
278
|
|
|
|
|
|
|
}else{ |
279
|
0
|
|
|
|
|
|
@files=readdir( $dh ); |
280
|
0
|
|
|
|
|
|
closedir( $dh ); |
281
|
|
|
|
|
|
|
} |
282
|
|
|
|
|
|
|
|
283
|
0
|
0
|
|
|
|
|
if (opendir( $dh, $filesdir ) ){ |
284
|
0
|
|
|
|
|
|
@files=readdir( $dh ); |
285
|
0
|
|
|
|
|
|
closedir( $dh ); |
286
|
|
|
|
|
|
|
} |
287
|
|
|
|
|
|
|
|
288
|
0
|
|
|
|
|
|
$int=0; |
289
|
0
|
|
|
|
|
|
my $rmObjDir=1; |
290
|
0
|
|
|
|
|
|
while ( defined( $files[$int] ) ){ |
291
|
0
|
0
|
0
|
|
|
|
if ( |
292
|
|
|
|
|
|
|
( $files[$int] ne '.' ) || |
293
|
|
|
|
|
|
|
( $files[$int] ne '..' ) |
294
|
|
|
|
|
|
|
){ |
295
|
0
|
|
|
|
|
|
$rmObjDir=0; |
296
|
|
|
|
|
|
|
} |
297
|
|
|
|
|
|
|
|
298
|
0
|
|
|
|
|
|
$int++; |
299
|
|
|
|
|
|
|
} |
300
|
|
|
|
|
|
|
|
301
|
0
|
0
|
|
|
|
|
if ( $rmObjDir ){ |
302
|
0
|
0
|
|
|
|
|
if ( ! rmdir( $dir ) ){ |
303
|
0
|
|
|
|
|
|
$objDirRMfailed=1; |
304
|
|
|
|
|
|
|
} |
305
|
|
|
|
|
|
|
} |
306
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
} |
308
|
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
#handles it if it errored |
310
|
0
|
0
|
0
|
|
|
|
if( |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
311
|
|
|
|
|
|
|
defined( $nonfiles[0] )|| |
312
|
|
|
|
|
|
|
$openFilesdirFailed || |
313
|
|
|
|
|
|
|
$indexNotAfile || |
314
|
|
|
|
|
|
|
$fileDirRMfailed || |
315
|
|
|
|
|
|
|
$objDirRMfailed || |
316
|
|
|
|
|
|
|
defined( $failed[0] ) |
317
|
|
|
|
|
|
|
){ |
318
|
|
|
|
|
|
|
|
319
|
0
|
|
|
|
|
|
my $error=''; |
320
|
|
|
|
|
|
|
|
321
|
0
|
0
|
|
|
|
|
if ( $indexNotAfile ){ |
322
|
0
|
|
|
|
|
|
$error='The index file, "'.$index.'", could not be removed. '; |
323
|
|
|
|
|
|
|
} |
324
|
|
|
|
|
|
|
|
325
|
0
|
0
|
|
|
|
|
if ( $openFilesdirFailed ){ |
326
|
0
|
|
|
|
|
|
$error=$error.'Could not open the files directory for reading '; |
327
|
|
|
|
|
|
|
} |
328
|
|
|
|
|
|
|
|
329
|
0
|
0
|
|
|
|
|
if ( $fileDirRMfailed ){ |
330
|
0
|
|
|
|
|
|
$error=$error.'Failed to remove the files directory, "'.$filesdir.'". '; |
331
|
|
|
|
|
|
|
} |
332
|
|
|
|
|
|
|
|
333
|
0
|
0
|
|
|
|
|
if ( $objDirRMfailed ){ |
334
|
0
|
|
|
|
|
|
$error=$error.'Failed to remove the object directory, "'.$dir.'".'; |
335
|
|
|
|
|
|
|
} |
336
|
|
|
|
|
|
|
|
337
|
0
|
|
|
|
|
|
my $int=0; |
338
|
|
|
|
|
|
|
|
339
|
0
|
0
|
|
|
|
|
if ( defined( $nonfiles[0] ) ){ |
340
|
0
|
|
|
|
|
|
$error=$error.'Some none files were found... '; |
341
|
0
|
|
|
|
|
|
while ( defined( $nonfiles[$int] ) ){ |
342
|
0
|
|
|
|
|
|
$error=$error.'"'.$nonfiles[$int].'" '; |
343
|
|
|
|
|
|
|
|
344
|
0
|
|
|
|
|
|
$int++; |
345
|
|
|
|
|
|
|
} |
346
|
|
|
|
|
|
|
} |
347
|
|
|
|
|
|
|
|
348
|
0
|
0
|
|
|
|
|
if ( defined( $failed[0] ) ){ |
349
|
0
|
|
|
|
|
|
$error=$error.'Some files could not be removed... '; |
350
|
0
|
|
|
|
|
|
$int=0; |
351
|
0
|
|
|
|
|
|
while ( defined( $failed[$int] ) ){ |
352
|
0
|
|
|
|
|
|
$error=$error.'"'.$failed[$int].'" '; |
353
|
|
|
|
|
|
|
|
354
|
0
|
|
|
|
|
|
$int++; |
355
|
|
|
|
|
|
|
} |
356
|
|
|
|
|
|
|
} |
357
|
|
|
|
|
|
|
|
358
|
0
|
|
|
|
|
|
$self->{error}=11; |
359
|
0
|
|
|
|
|
|
$self->{errorString}=$error; |
360
|
0
|
|
|
|
|
|
$self->warn; |
361
|
0
|
|
|
|
|
|
return undef; |
362
|
|
|
|
|
|
|
} |
363
|
|
|
|
|
|
|
|
364
|
0
|
|
|
|
|
|
return 1; |
365
|
|
|
|
|
|
|
} |
366
|
|
|
|
|
|
|
|
367
|
|
|
|
|
|
|
=head1 ERROR CODES |
368
|
|
|
|
|
|
|
|
369
|
|
|
|
|
|
|
=head2 1, noToaderObj |
370
|
|
|
|
|
|
|
|
371
|
|
|
|
|
|
|
No L object passed. |
372
|
|
|
|
|
|
|
|
373
|
|
|
|
|
|
|
=head2 2, notAtoaderObj |
374
|
|
|
|
|
|
|
|
375
|
|
|
|
|
|
|
The passed object is not a L object. |
376
|
|
|
|
|
|
|
|
377
|
|
|
|
|
|
|
=head2 3, toaderPerror |
378
|
|
|
|
|
|
|
|
379
|
|
|
|
|
|
|
The L object passed has a permanent error set. |
380
|
|
|
|
|
|
|
|
381
|
|
|
|
|
|
|
=head2 4, notAdirectoryObj |
382
|
|
|
|
|
|
|
|
383
|
|
|
|
|
|
|
The passed object is not a L object. |
384
|
|
|
|
|
|
|
|
385
|
|
|
|
|
|
|
=head2 5, noObj |
386
|
|
|
|
|
|
|
|
387
|
|
|
|
|
|
|
No object passed. |
388
|
|
|
|
|
|
|
|
389
|
|
|
|
|
|
|
=head2 6, noOutputDirSet |
390
|
|
|
|
|
|
|
|
391
|
|
|
|
|
|
|
The L object has not had a output directory set. |
392
|
|
|
|
|
|
|
|
393
|
|
|
|
|
|
|
=head2 7, outputDirDoesNotExist |
394
|
|
|
|
|
|
|
|
395
|
|
|
|
|
|
|
The output directory does not appear to exist or is not a directory. |
396
|
|
|
|
|
|
|
|
397
|
|
|
|
|
|
|
=head2 8, objPerror |
398
|
|
|
|
|
|
|
|
399
|
|
|
|
|
|
|
The object has a permanent error set. |
400
|
|
|
|
|
|
|
|
401
|
|
|
|
|
|
|
=head2 9, noDirSet |
402
|
|
|
|
|
|
|
|
403
|
|
|
|
|
|
|
The object has not had a directory set for it. |
404
|
|
|
|
|
|
|
|
405
|
|
|
|
|
|
|
=head2 10, pathhelperErrored |
406
|
|
|
|
|
|
|
|
407
|
|
|
|
|
|
|
L errored. |
408
|
|
|
|
|
|
|
|
409
|
|
|
|
|
|
|
=head2 11, cleanupFailed |
410
|
|
|
|
|
|
|
|
411
|
|
|
|
|
|
|
Failed to cleanup up the old rendered object. |
412
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
=head1 AUTHOR |
414
|
|
|
|
|
|
|
|
415
|
|
|
|
|
|
|
Zane C. Bowers-Hadley, C<< >> |
416
|
|
|
|
|
|
|
|
417
|
|
|
|
|
|
|
=head1 BUGS |
418
|
|
|
|
|
|
|
|
419
|
|
|
|
|
|
|
Please report any bugs or feature requests to C, or through |
420
|
|
|
|
|
|
|
the web interface at L. I will be notified, and then you'll |
421
|
|
|
|
|
|
|
automatically be notified of progress on your bug as I make changes. |
422
|
|
|
|
|
|
|
|
423
|
|
|
|
|
|
|
|
424
|
|
|
|
|
|
|
|
425
|
|
|
|
|
|
|
|
426
|
|
|
|
|
|
|
=head1 SUPPORT |
427
|
|
|
|
|
|
|
|
428
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
429
|
|
|
|
|
|
|
|
430
|
|
|
|
|
|
|
perldoc Toader::Render::Directory::Cleanup |
431
|
|
|
|
|
|
|
|
432
|
|
|
|
|
|
|
You can also look for information at: |
433
|
|
|
|
|
|
|
|
434
|
|
|
|
|
|
|
=over 4 |
435
|
|
|
|
|
|
|
|
436
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker |
437
|
|
|
|
|
|
|
|
438
|
|
|
|
|
|
|
L |
439
|
|
|
|
|
|
|
|
440
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
441
|
|
|
|
|
|
|
|
442
|
|
|
|
|
|
|
L |
443
|
|
|
|
|
|
|
|
444
|
|
|
|
|
|
|
=item * CPAN Ratings |
445
|
|
|
|
|
|
|
|
446
|
|
|
|
|
|
|
L |
447
|
|
|
|
|
|
|
|
448
|
|
|
|
|
|
|
=item * Search CPAN |
449
|
|
|
|
|
|
|
|
450
|
|
|
|
|
|
|
L |
451
|
|
|
|
|
|
|
|
452
|
|
|
|
|
|
|
=back |
453
|
|
|
|
|
|
|
|
454
|
|
|
|
|
|
|
|
455
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
456
|
|
|
|
|
|
|
|
457
|
|
|
|
|
|
|
|
458
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
459
|
|
|
|
|
|
|
|
460
|
|
|
|
|
|
|
Copyright 2013. Zane C. Bowers-Hadley. |
461
|
|
|
|
|
|
|
|
462
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
463
|
|
|
|
|
|
|
under the terms of either: the GNU General Public License as published |
464
|
|
|
|
|
|
|
by the Free Software Foundation; or the Artistic License. |
465
|
|
|
|
|
|
|
|
466
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information. |
467
|
|
|
|
|
|
|
|
468
|
|
|
|
|
|
|
|
469
|
|
|
|
|
|
|
=cut |
470
|
|
|
|
|
|
|
|
471
|
|
|
|
|
|
|
1; # End of Toader::Render::Directory::Cleanup |