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