EPUB-Parser

 view release on metacpan or  search on metacpan

lib/EPUB/Parser/File/OPF/Context.pm  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
use strict;
use Scalar::Util qw/weaken/;
use EPUB::Parser::Util::Context qw/child_class context_name parser/;
 
sub new {
    args(
        my $class  => 'ClassName',
        my $opf    => { isa => 'EPUB::Parser::File::OPF' },
        my $context_name => 'Str',
        my $parser,
    );
 
    my $child_class = $class->child_class({
        context_name => $context_name,
    });
 
    my $child = bless {
        opf       => $opf,
        parser    => $parser,
        context_name => $context_name,
    } => $child_class;
 
    weaken $child->{opf};
 
    return $child;
}
 
 
sub opf { shift->{opf} }
 
1;



( run in 0.312 second using v1.01-cache-2.11-cpan-fd5d4e115d8 )