| 1 | package EBook::Generator; | ||
| 2 | |||
| 3 | 1 | ▶ | use 5.008009; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | #use Data::Dumper; | ||
| 7 | |||
| 8 | 1 | ▶ | use EBook::Generator::EBook; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 1 | our $VERSION = '0.01'; | |
| 11 | |||
| 12 | sub new | ||
| 13 | 0 | ▶ | { |
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 14 | 0 | my ($class, @args) = @_; | |
| 15 | 0 | my $self = bless {}, $class; | |
| 16 | 0 | return $self->init(@args); | |
| 17 | } | ||
| 18 | |||
| 19 | sub init | ||
| 20 | 0 | ▶ | { |
|
Subroutine
init: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 21 | 0 | my ($self) = @_; | |
| 22 | 0 | $self->{'ebooks'} = []; | |
| 23 | 0 | $self->{'latest-log'} = []; | |
| 24 | 0 | return $self; | |
| 25 | } | ||
| 26 | |||
| 27 | sub processSource | ||
| 28 | 0 | ▶ | { |
|
Subroutine
processSource: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 29 | 0 | my ($self, $url, $format, @options) = @_; | |
| 30 | 0 | my $ebook = EBook::Generator::EBook->new($url, @options); | |
| 31 | 0 | push @{$self->{'ebooks'}}, $ebook; | |
| 32 | 0 | my $filename = $ebook->writeEBook($format); | |
| 33 | 0 | $self->{'latest-log'} = $ebook->getLog(); | |
| 34 | 0 | return $filename; | |
| 35 | } | ||
| 36 | |||
| 37 | sub getLog | ||
| 38 | 0 | ▶ | { |
|
Subroutine
getLog: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 39 | 0 | my ($self) = @_; | |
| 40 | 0 | return $self->{'latest-log'}; | |
| 41 | } | ||
| 42 | |||
| 43 | # Preloaded methods go here. | ||
| 44 | |||
| 45 | 1 | 1; | |
| 46 | __END__ | ||