| 1 | package Toader::Render::Page; | ||
| 2 | |||
| 3 | use warnings; | ||
| 4 | use strict; | ||
| 5 | use base 'Error::Helper'; | ||
| 6 | use Toader::Render::General; | ||
| 7 | use Toader::Templates; | ||
| 8 | use Date::Parse; | ||
| 9 | use Toader::pathHelper; | ||
| 10 | use File::Path qw(make_path); | ||
| 11 | use Toader::Render::Page::Cleanup; | ||
| 12 | |||
| 13 | =head1 NAME | ||
| 14 | |||
| 15 | Toader::Render::Page - This renders a Toader::Page object. | ||
| 16 | |||
| 17 | =head1 VERSION | ||
| 18 | |||
| 19 | Version 0.1.1 | ||
| 20 | |||
| 21 | =cut | ||
| 22 | |||
| 23 | our $VERSION = '0.1.1'; | ||
| 24 | |||
| 25 | =head1 SYNOPSIS | ||
| 26 | |||
| 27 | =head1 METHODS | ||
| 28 | |||
| 29 | =head2 new | ||
| 30 | |||
| 31 | This initiates the object. | ||
| 32 | |||
| 33 | =head3 args hash ref | ||
| 34 | |||
| 35 | =head4 obj | ||
| 36 | |||
| 37 | This is the L<Toader::Page> object to render. | ||
| 38 | |||
| 39 | =head4 toader | ||
| 40 | |||
| 41 | This is the L<Toader> object to use. | ||
| 42 | |||
| 43 | =head2 toDir | ||
| 44 | |||
| 45 | This is the value used to get from the directory it is being | ||
| 46 | rendered in back to directory storing stuff for that directory. By | ||
| 47 | default this is '../../' as it needs to get from '.pages/'.$pageName | ||
| 48 | back to the directory. Or we are creating a listing of the last | ||
| 49 | several in the '.pages/' directory, it should be set it to '../'. | ||
| 50 | |||
| 51 | |||
| 52 | my $foo=Toader::Render::Page->new(\%args); | ||
| 53 | if($foo->error){ | ||
| 54 | warn('error: '.$foo->error.":".$foo->errorString); | ||
| 55 | } | ||
| 56 | |||
| 57 | =cut | ||
| 58 | |||
| 59 | sub new{ | ||
| 60 | my %args; | ||
| 61 | if(defined($_[1])){ | ||
| 62 | %args= %{$_[1]}; | ||
| 63 | }; | ||
| 64 | |||
| 65 | my $self={ | ||
| 66 | error=>undef, | ||
| 67 | errorString=>'', | ||
| 68 | perror=>undef, | ||
| 69 | toDir=>'../../', | ||
| 70 | errorExtra=>{ | ||
| 71 | flags=>{ | ||
| 72 | 1=>'noObj', | ||
| 73 | 2=>'noToaderObj', | ||
| 74 | 3=>'objPerror', | ||
| 75 | 4=>'toaderPerror', | ||
| 76 | 5=>'noDirSet', | ||
| 77 | 6=>'cleanupInitErrored', | ||
| 78 | 7=>'cleanupErrored', | ||
| 79 | 8=>'backendInitErrored', | ||
| 80 | 9=>'pathhelperInitErrored', | ||
| 81 | 11=>'noOutputDirSet', | ||
| 82 | 12=>'outputDirDoesNotExist', | ||
| 83 | 13=>'outputPageDirCreationFailed', | ||
| 84 | 14=>'outputFileDirCreationFailed', | ||
| 85 | }, | ||
| 86 | }, | ||
| 87 | }; | ||
| 88 | bless $self; | ||
| 89 | |||
| 90 | if ( defined( $args{toDir} ) ){ | ||
| 91 | $self->{toDir}=$args{toDir}; | ||
| 92 | } | ||
| 93 | |||
| 94 | #make sure we have a Toader::Page object. | ||
| 95 | if ( ! defined( $args{obj} ) ){ | ||
| 96 | $self->{perror}=1; | ||
| 97 | $self->{error}=1; | ||
| 98 | $self->{errorString}='Nothing defined for the Toader::Page object'; | ||
| 99 | $self->warn; | ||
| 100 | return $self; | ||
| 101 | } | ||
| 102 | if ( ref( $args{obj} ) ne 'Toader::Page' ){ | ||
| 103 | $self->{perror}=1; | ||
| 104 | $self->{error}=1; | ||
| 105 | $self->{errorString}='The specified object is not a Toader::Page object, but a "'. | ||
| 106 | ref( $args{obj} ).'"'; | ||
| 107 | $self->warn; | ||
| 108 | return $self; | ||
| 109 | } | ||
| 110 | $self->{obj}=$args{obj}; | ||
| 111 | |||
| 112 | #make sure the object does not have a permanent error set | ||
| 113 | if( ! $self->{obj}->errorblank ){ | ||
| 114 | $self->{perror}=1; | ||
| 115 | $self->{error}=3; | ||
| 116 | $self->{errorString}='The Toader::Page object has a permanent error set'; | ||
| 117 | $self->warn; | ||
| 118 | return $self; | ||
| 119 | } | ||
| 120 | |||
| 121 | #make sure a Toader object is given | ||
| 122 | if ( ! defined( $args{toader} ) ){ | ||
| 123 | $self->{perror}=1; | ||
| 124 | $self->{error}=2; | ||
| 125 | $self->{errorString}='Nothing defined for the Toader object'; | ||
| 126 | $self->warn; | ||
| 127 | return $self; | ||
| 128 | } | ||
| 129 | if ( ref( $args{toader} ) ne 'Toader' ){ | ||
| 130 | $self->{perror}=1; | ||
| 131 | $self->{error}=2; | ||
| 132 | $self->{errorString}='The specified object is not a Toader object, but a "'. | ||
| 133 | ref( $args{toader} ).'"'; | ||
| 134 | $self->warn; | ||
| 135 | return $self; | ||
| 136 | } | ||
| 137 | $self->{toader}=$args{toader}; | ||
| 138 | |||
| 139 | #make sure the object does not have a permanent error set | ||
| 140 | if( ! $self->{toader}->errorblank ){ | ||
| 141 | $self->{perror}=1; | ||
| 142 | $self->{error}=4; | ||
| 143 | $self->{errorString}='The Toader object has a permanent error set'; | ||
| 144 | $self->warn; | ||
| 145 | return $self; | ||
| 146 | } | ||
| 147 | |||
| 148 | #make sure a directory is set | ||
| 149 | if( ! defined( $self->{obj}->dirGet ) ){ | ||
| 150 | $self->{perror}=1; | ||
| 151 | $self->{error}=5; | ||
| 152 | $self->{errorString}='The Toader::Page object does not have a directory set'; | ||
| 153 | $self->warn; | ||
| 154 | return $self; | ||
| 155 | } | ||
| 156 | $self->{dir}=$self->{obj}->dirGet; | ||
| 157 | |||
| 158 | #initialize this here for simplicity | ||
| 159 | $self->{t}=Toader::Templates->new({ | ||
| 160 | dir=>$self->{obj}->dirGet, | ||
| 161 | toader=>$args{toader}, | ||
| 162 | }); | ||
| 163 | |||
| 164 | #initialize the general object here for simplicity | ||
| 165 | $self->{g}=Toader::Render::General->new( | ||
| 166 | { | ||
| 167 | toader=>$self->{toader}, | ||
| 168 | self=>\$self, | ||
| 169 | obj=>$self->{obj}, | ||
| 170 | toDir=>$self->{toDir}, | ||
| 171 | } | ||
| 172 | ); | ||
| 173 | if ( $self->{g}->error ){ | ||
| 174 | $self->{perror}=''; | ||
| 175 | } | ||
| 176 | |||
| 177 | #initialize the Toader::pathHelper | ||
| 178 | $self->{ph}=Toader::pathHelper->new( $self->{dir} ); | ||
| 179 | if ( $self->{ph}->error ){ | ||
| 180 | $self->{perror}=1; | ||
| 181 | $self->{error}=6; | ||
| 182 | $self->{errorString}='Failed to initiate pathHelper. error="'. | ||
| 183 | $self->{ph}->error.'" errorString="'.$self->{ph}->errorString.'"'; | ||
| 184 | $self->warn; | ||
| 185 | return $self; | ||
| 186 | } | ||
| 187 | |||
| 188 | #gets the r2r for the object | ||
| 189 | $self->{r2r}=$self->{ph}->relative2root( $self->{dir} ); | ||
| 190 | if ( $self->{ph}->error ){ | ||
| 191 | $self->{perror}=1; | ||
| 192 | $self->{error}=19; | ||
| 193 | $self->{errorString}='pathHelper failed to find the relative2root path for "'. | ||
| 194 | $self->{odir}.'"'; | ||
| 195 | $self->warn; | ||
| 196 | return $self; | ||
| 197 | } | ||
| 198 | |||
| 199 | return $self; | ||
| 200 | } | ||
| 201 | |||
| 202 | =head2 content | ||
| 203 | |||
| 204 | This renders the content to be included in a static page. | ||
| 205 | |||
| 206 | my $content=$foo->content; | ||
| 207 | |||
| 208 | =cut | ||
| 209 | |||
| 210 | sub content{ | ||
| 211 | my $self=$_[0]; | ||
| 212 | |||
| 213 | if ( ! $self->errorblank ){ | ||
| 214 | return undef; | ||
| 215 | } | ||
| 216 | |||
| 217 | #puts together the date stuff | ||
| 218 | my $date=$self->{obj}->{mime}->header("Date"); | ||
| 219 | my ($sec,$min,$hour,$day,$month,$year,$zone) = strptime($date); | ||
| 220 | $year=1900+$year; | ||
| 221 | |||
| 222 | #make sure everything is double digits | ||
| 223 | if( $sec < 10 ){ | ||
| 224 | $sec='0'.$sec; | ||
| 225 | } | ||
| 226 | if( $min < 10 ){ | ||
| 227 | $min='0'.$min; | ||
| 228 | } | ||
| 229 | if( $hour < 10 ){ | ||
| 230 | $hour='0'.$hour; | ||
| 231 | } | ||
| 232 | if( $day < 10 ){ | ||
| 233 | $day='0'.$day; | ||
| 234 | } | ||
| 235 | if( $month < 10 ){ | ||
| 236 | $month='0'.$month; | ||
| 237 | } | ||
| 238 | |||
| 239 | my $body=$self->{t}->fill_in_string( $self->{obj}->bodyGet, | ||
| 240 | { | ||
| 241 | name=>$self->{obj}->nameGet, | ||
| 242 | from=>$self->{obj}->fromGet, | ||
| 243 | g=>\$self->{g}, | ||
| 244 | toader=>\$self->{toader}, | ||
| 245 | sec=>$sec, | ||
| 246 | min=>$min, | ||
| 247 | hour=>$hour, | ||
| 248 | day=>$day, | ||
| 249 | month=>$month, | ||
| 250 | year=>$year, | ||
| 251 | zone=>$zone, | ||
| 252 | obj=>\$self->{obj}, | ||
| 253 | self=>\$self, | ||
| 254 | c=>\$self->{toader}->getConfig, | ||
| 255 | }); | ||
| 256 | if ( $self->{t}->error ){ | ||
| 257 | $self->{error}=8; | ||
| 258 | $self->{errorString}='Filling in the template failed. error="'. | ||
| 259 | $self->{t}->error.'" errorString="'.$self->{t}->errorString.'"'; | ||
| 260 | $self->warn; | ||
| 261 | return undef; | ||
| 262 | } | ||
| 263 | |||
| 264 | #this prepares to run it through the specified renderer | ||
| 265 | my $renderer; | ||
| 266 | my $torun='use Toader::Render::Page::backends::'.$self->{obj}->rendererGet.'; '. | ||
| 267 | '$renderer=Toader::Render::Page::backends::'.$self->{obj}->rendererGet.'->new({'. | ||
| 268 | 'obj=>$self->{obj}, toader=>$self->{toader}, });'; | ||
| 269 | eval( $torun ); | ||
| 270 | if ( ! defined( $renderer ) ){ | ||
| 271 | $self->{error}=8; | ||
| 272 | $self->{errorString}='Failed to initialize the backend. It returned undef. '. | ||
| 273 | 'renderer="'.$self->{obj}->rendererGet.'"'; | ||
| 274 | $self->warn; | ||
| 275 | return undef; | ||
| 276 | } | ||
| 277 | if ( $renderer->error ){ | ||
| 278 | $self->{error}=8; | ||
| 279 | $self->{errorString}='Failed to initialize the backend. It returned with an error. '. | ||
| 280 | 'error="'.$renderer->error.'" errorString="'.$renderer->errorString.'"'; | ||
| 281 | $self->warn; | ||
| 282 | return undef; | ||
| 283 | } | ||
| 284 | |||
| 285 | #render it | ||
| 286 | my $content=$renderer->render( $body ); | ||
| 287 | if ( $renderer->error ){ | ||
| 288 | $self->{error}=9; | ||
| 289 | $self->{errorString}='Failed to render the content. It returned an error. '. | ||
| 290 | 'error="'.$renderer->error.'" errorString="'.$renderer->errorString.'"'; | ||
| 291 | $self->warn; | ||
| 292 | return undef; | ||
| 293 | } | ||
| 294 | |||
| 295 | $content=$self->{t}->fill_in( 'pageContent', | ||
| 296 | { | ||
| 297 | body=>$content, | ||
| 298 | name=>$self->{obj}->nameGet, | ||
| 299 | from=>$self->{obj}->fromGet, | ||
| 300 | g=>\$self->{general}, | ||
| 301 | toader=>\$self->{toader}, | ||
| 302 | sec=>$sec, | ||
| 303 | min=>$min, | ||
| 304 | hour=>$hour, | ||
| 305 | day=>$day, | ||
| 306 | month=>$month, | ||
| 307 | year=>$year, | ||
| 308 | zone=>$zone, | ||
| 309 | self=>\$self, | ||
| 310 | obj=>\$self->{obj}, | ||
| 311 | c=>\$self->{toader}->getConfig, | ||
| 312 | }); | ||
| 313 | if ( $self->{t}->error ){ | ||
| 314 | $self->{error}=8; | ||
| 315 | $self->{errorString}='Filling in the template failed. error="'. | ||
| 316 | $self->{t}->error.'" errorString="'.$self->{t}->errorString.'"'; | ||
| 317 | $self->warn; | ||
| 318 | return undef; | ||
| 319 | } | ||
| 320 | |||
| 321 | return $content; | ||
| 322 | } | ||
| 323 | |||
| 324 | =head2 render | ||
| 325 | |||
| 326 | This renders the object. | ||
| 327 | |||
| 328 | No arguments are taken. | ||
| 329 | |||
| 330 | =cut | ||
| 331 | |||
| 332 | sub render{ | ||
| 333 | my $self=$_[0]; | ||
| 334 | |||
| 335 | if ( ! $self->errorblank ){ | ||
| 336 | return undef; | ||
| 337 | } | ||
| 338 | |||
| 339 | #makes sure we have a output directory set... | ||
| 340 | #while we don't care about this for rendering the content, we do need to | ||
| 341 | #know this for actually fully rendering it | ||
| 342 | my $output=$self->{toader}->getOutputDir; | ||
| 343 | if ( ! defined( $output ) ){ | ||
| 344 | $self->{error}=11; | ||
| 345 | $self->{errorString}='No output directory has been set for the Toader object'; | ||
| 346 | $self->warn; | ||
| 347 | return undef; | ||
| 348 | } | ||
| 349 | |||
| 350 | #makes sure the output directory exists | ||
| 351 | if ( ! -d $output ){ | ||
| 352 | $self->{error}=12; | ||
| 353 | $self->{errorString}='The output directory, "'.$output.'", does not exist'; | ||
| 354 | $self->warn; | ||
| 355 | return undef; | ||
| 356 | } | ||
| 357 | |||
| 358 | #clean up the old page | ||
| 359 | my $cleanup=Toader::Render::Page::Cleanup->new( $self->{toader} ); | ||
| 360 | if ( $cleanup->error ){ | ||
| 361 | $self->{error}=6; | ||
| 362 | $self->{errorString}='Initialing the cleanup module failed. error="'. | ||
| 363 | $cleanup->error.'" errorString="'.$cleanup->errorString.'"'; | ||
| 364 | $self->warn; | ||
| 365 | return undef; | ||
| 366 | } | ||
| 367 | $cleanup->cleanup( $self->{obj} ); | ||
| 368 | if ( $cleanup->error ){ | ||
| 369 | $self->{error}=7; | ||
| 370 | $self->{errorString}='Cleanup failed. error="'.$cleanup->error. | ||
| 371 | '" errorString="'.$cleanup->errorString.'"'; | ||
| 372 | $self->warn; | ||
| 373 | return undef; | ||
| 374 | } | ||
| 375 | |||
| 376 | #this renders the content of it | ||
| 377 | my $content=$self->content; | ||
| 378 | if ( $self->error ){ | ||
| 379 | $self->warnString('Failed to render the content to include'); | ||
| 380 | return undef; | ||
| 381 | } | ||
| 382 | |||
| 383 | my $page=$self->{t}->fill_in( 'page', | ||
| 384 | { | ||
| 385 | toader=>\$self->{toader}, | ||
| 386 | g=>\$self->{g}, | ||
| 387 | self=>\$self, | ||
| 388 | obj=>\$self->{obj}, | ||
| 389 | c=>\$self->{toader}->getConfig, | ||
| 390 | content=>$content, | ||
| 391 | }); | ||
| 392 | if ( $self->{t}->error ){ | ||
| 393 | $self->{error}=8; | ||
| 394 | $self->{errorString}='Filling in the template failed. error="'. | ||
| 395 | $self->{t}->error.'" errorString="'.$self->{t}->errorString.'"'; | ||
| 396 | $self->warn; | ||
| 397 | return undef; | ||
| 398 | } | ||
| 399 | |||
| 400 | #put together some paths for later use | ||
| 401 | my $pageDir=$output.'/'.$self->{r2r}.'/.pages/'.$self->{obj}->nameGet; | ||
| 402 | my $index=$pageDir.'/index.html'; | ||
| 403 | my $fileDir=$pageDir.'/.files'; | ||
| 404 | |||
| 405 | #make sure the files and entry directory exist | ||
| 406 | if ( ! -d $pageDir ){ | ||
| 407 | if ( ! make_path( $pageDir ) ){ | ||
| 408 | $self->{error}=13; | ||
| 409 | $self->{errorString}='The output entry directry, "'.$pageDir.'", could not be created'; | ||
| 410 | $self->warn; | ||
| 411 | return undef; | ||
| 412 | } | ||
| 413 | } | ||
| 414 | if ( ! -d $fileDir ){ | ||
| 415 | if ( ! make_path( $fileDir ) ){ | ||
| 416 | $self->{error}=14; | ||
| 417 | $self->{errorString}='The output file directry, "'.$fileDir.'", could not be created'; | ||
| 418 | $self->warn; | ||
| 419 | return undef; | ||
| 420 | } | ||
| 421 | } | ||
| 422 | |||
| 423 | #write the index out | ||
| 424 | my $fh; | ||
| 425 | if ( ! open( $fh, '>', $index ) ){ | ||
| 426 | $self->{error}=15; | ||
| 427 | $self->{errorString}='Failed to open the index, "'.$index.'", for writing'; | ||
| 428 | $self->warn; | ||
| 429 | return undef; | ||
| 430 | } | ||
| 431 | print $fh $page; | ||
| 432 | close( $fh ); | ||
| 433 | |||
| 434 | #extract the files | ||
| 435 | $self->{obj}->subpartsExtract( $fileDir ); | ||
| 436 | if ( $self->{obj}->error ){ | ||
| 437 | $self->{error}=16; | ||
| 438 | $self->{errorString}='Failed to extract the subparts. error="'. | ||
| 439 | $self->{obj}->error.'" errorString="'.$self->{obj}->errorString.'"'; | ||
| 440 | $self->warn; | ||
| 441 | return undef; | ||
| 442 | } | ||
| 443 | |||
| 444 | return 1; | ||
| 445 | } | ||
| 446 | |||
| 447 | =head2 summary | ||
| 448 | |||
| 449 | =cut | ||
| 450 | |||
| 451 | sub summary{ | ||
| 452 | my $self=$_[0]; | ||
| 453 | |||
| 454 | if ( ! $self->errorblank ){ | ||
| 455 | return undef; | ||
| 456 | } | ||
| 457 | |||
| 458 | #makes sure we have a output directory set... | ||
| 459 | #while we don't care about this for rendering the content, we do need to | ||
| 460 | #know this for actually fully rendering it | ||
| 461 | my $output=$self->{toader}->getOutputDir; | ||
| 462 | if ( ! defined( $output ) ){ | ||
| 463 | $self->{error}=11; | ||
| 464 | $self->{errorString}='No output directory has been set for the Toader object'; | ||
| 465 | $self->warn; | ||
| 466 | return undef; | ||
| 467 | } | ||
| 468 | |||
| 469 | #makes sure the output directory exists | ||
| 470 | if ( ! -d $output ){ | ||
| 471 | $self->{error}=12; | ||
| 472 | $self->{errorString}='The output directory, "'.$output.'", does not exist'; | ||
| 473 | $self->warn; | ||
| 474 | return undef; | ||
| 475 | } | ||
| 476 | |||
| 477 | #this renders the content of it | ||
| 478 | my $content=$self->summaryContent; | ||
| 479 | if ( $self->error ){ | ||
| 480 | $self->warnString('Failed to render the content to include'); | ||
| 481 | return undef; | ||
| 482 | } | ||
| 483 | |||
| 484 | my $page=$self->{t}->fill_in( 'page', | ||
| 485 | { | ||
| 486 | toader=>\$self->{toader}, | ||
| 487 | g=>\$self->{g}, | ||
| 488 | self=>\$self, | ||
| 489 | obj=>\$self->{obj}, | ||
| 490 | c=>\$self->{toader}->getConfig, | ||
| 491 | locationID=>'Pages Summary', | ||
| 492 | content=>$content, | ||
| 493 | }); | ||
| 494 | if ( $self->{t}->error ){ | ||
| 495 | $self->{error}=8; | ||
| 496 | $self->{errorString}='Filling in the template failed. error="'. | ||
| 497 | $self->{t}->error.'" errorString="'.$self->{t}->errorString.'"'; | ||
| 498 | $self->warn; | ||
| 499 | return undef; | ||
| 500 | } | ||
| 501 | |||
| 502 | #the paths that will be used | ||
| 503 | my $dir=$output.'/'.$self->{r2r}.'/.pages/'; | ||
| 504 | my $index=$dir.'summary.html'; | ||
| 505 | |||
| 506 | #make sure the files and entry directory exist | ||
| 507 | if ( ! -d $dir ){ | ||
| 508 | if ( ! make_path( $dir ) ){ | ||
| 509 | $self->{error}=13; | ||
| 510 | $self->{errorString}='The output entry directry, "'.$dir.'", could not be created'; | ||
| 511 | $self->warn; | ||
| 512 | return undef; | ||
| 513 | } | ||
| 514 | } | ||
| 515 | |||
| 516 | #write the index out | ||
| 517 | my $fh; | ||
| 518 | if ( ! open( $fh, '>', $index ) ){ | ||
| 519 | $self->{error}=15; | ||
| 520 | $self->{errorString}='Failed to open the index, "'.$index.'", for writing'; | ||
| 521 | $self->warn; | ||
| 522 | return undef; | ||
| 523 | } | ||
| 524 | print $fh $page; | ||
| 525 | close( $fh ); | ||
| 526 | |||
| 527 | return 1; | ||
| 528 | } | ||
| 529 | |||
| 530 | =head2 summaryContent | ||
| 531 | |||
| 532 | =cut | ||
| 533 | |||
| 534 | sub summaryContent{ | ||
| 535 | my $self=$_[0]; | ||
| 536 | |||
| 537 | if ( ! $self->errorblank ){ | ||
| 538 | return undef; | ||
| 539 | } | ||
| 540 | |||
| 541 | my $content=$self->{t}->fill_in( 'pageSummary', | ||
| 542 | { | ||
| 543 | toader=>\$self->{toader}, | ||
| 544 | g=>\$self->{g}, | ||
| 545 | self=>\$self, | ||
| 546 | obj=>\$self->{obj}, | ||
| 547 | c=>\$self->{toader}->getConfig, | ||
| 548 | }); | ||
| 549 | if ( $self->{t}->error ){ | ||
| 550 | $self->{error}=8; | ||
| 551 | $self->{errorString}='Filling in the template failed. error="'. | ||
| 552 | $self->{t}->error.'" errorString="'.$self->{t}->errorString.'"'; | ||
| 553 | $self->warn; | ||
| 554 | return undef; | ||
| 555 | } | ||
| 556 | |||
| 557 | return $content; | ||
| 558 | } | ||
| 559 | |||
| 560 | =head1 ERROR CODES | ||
| 561 | |||
| 562 | =head2 1, noObj | ||
| 563 | |||
| 564 | No L<Toader::Page> object specified. | ||
| 565 | |||
| 566 | =head2 2, noToaderObj | ||
| 567 | |||
| 568 | No L<Toader> object specified. | ||
| 569 | |||
| 570 | =head2 3, objPerror | ||
| 571 | |||
| 572 | The L<Toader::Page> object has a permanent error set. | ||
| 573 | |||
| 574 | =head2 4, toaderPerror | ||
| 575 | |||
| 576 | The L<Toader> object has a permanent error set. | ||
| 577 | |||
| 578 | =head2 5, noDirSet | ||
| 579 | |||
| 580 | The L<Toader::Page> object does not have a directory set | ||
| 581 | |||
| 582 | =head2 6, cleanupInitErrored | ||
| 583 | |||
| 584 | Failed to initialize the cleanup module. | ||
| 585 | |||
| 586 | =head2 7, cleanupErrored | ||
| 587 | |||
| 588 | Failed to cleanup. | ||
| 589 | |||
| 590 | =head2 8, backendInitErrored | ||
| 591 | |||
| 592 | Failed to initialize the backend. | ||
| 593 | |||
| 594 | =head2 9, pathhelperInitErrored | ||
| 595 | |||
| 596 | Failed to initialize the path helper. | ||
| 597 | |||
| 598 | =head2 11, noOutputDirSet | ||
| 599 | |||
| 600 | The L<Toader> object does not have a output directory set. | ||
| 601 | |||
| 602 | =head2 12, outputDirDoesNotExist | ||
| 603 | |||
| 604 | The output directory does not exist. | ||
| 605 | |||
| 606 | =head2 13, outputPageDirCreationFailed | ||
| 607 | |||
| 608 | The output page directory could not be created. | ||
| 609 | |||
| 610 | =head2 14, outputFileDirCreationFailed | ||
| 611 | |||
| 612 | The output file directory could not be created. | ||
| 613 | |||
| 614 | =head1 AUTHOR | ||
| 615 | |||
| 616 | Zane C. Bowers-Hadley, C<< <vvelox at vvelox.net> >> | ||
| 617 | |||
| 618 | =head1 BUGS | ||
| 619 | |||
| 620 | Please report any bugs or feature requests to C<bug-toader at rt.cpan.org>, or through | ||
| 621 | the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Toader>. I will be notified, and then you'll | ||
| 622 | automatically be notified of progress on your bug as I make changes. | ||
| 623 | |||
| 624 | |||
| 625 | |||
| 626 | |||
| 627 | =head1 SUPPORT | ||
| 628 | |||
| 629 | You can find documentation for this module with the perldoc command. | ||
| 630 | |||
| 631 | perldoc Toader::Render::Page | ||
| 632 | |||
| 633 | |||
| 634 | You can also look for information at: | ||
| 635 | |||
| 636 | =over 4 | ||
| 637 | |||
| 638 | =item * RT: CPAN's request tracker | ||
| 639 | |||
| 640 | L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Toader> | ||
| 641 | |||
| 642 | =item * AnnoCPAN: Annotated CPAN documentation | ||
| 643 | |||
| 644 | L<http://annocpan.org/dist/Toader> | ||
| 645 | |||
| 646 | =item * CPAN Ratings | ||
| 647 | |||
| 648 | L<http://cpanratings.perl.org/d/Toader> | ||
| 649 | |||
| 650 | =item * Search CPAN | ||
| 651 | |||
| 652 | L<http://search.cpan.org/dist/Toader/> | ||
| 653 | |||
| 654 | =back | ||
| 655 | |||
| 656 | |||
| 657 | =head1 ACKNOWLEDGEMENTS | ||
| 658 | |||
| 659 | |||
| 660 | =head1 LICENSE AND COPYRIGHT | ||
| 661 | |||
| 662 | Copyright 2013. Zane C. Bowers-Hadley. | ||
| 663 | |||
| 664 | This program is free software; you can redistribute it and/or modify it | ||
| 665 | under the terms of either: the GNU General Public License as published | ||
| 666 | by the Free Software Foundation; or the Artistic License. | ||
| 667 | |||
| 668 | See http://dev.perl.org/licenses/ for more information. | ||
| 669 | |||
| 670 | |||
| 671 | =cut | ||
| 672 | |||
| 673 | 1; # End of Toader::Render::Page |