| 1 | # -*- mode: perl; coding: utf-8 -*- | ||||||||||
| 2 | package YATT::LRXML::MetaInfo; | ||||||||||
| 3 | 7 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 7 | ▶ | use warnings qw(FATAL all NONFATAL misc); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 7 | ▶ | use base qw(YATT::Class::Configurable); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 7 | ▶ | BEGIN {require Exporter; *import = \&Exporter::import} | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 7 | our @EXPORT = qw(MetaInfo); | |||||||||
| 8 | 7 | our @EXPORT_OK = @EXPORT; | |||||||||
| 9 | |||||||||||
| 10 | sub MetaInfo () {__PACKAGE__} | ||||||||||
| 11 | |||||||||||
| 12 | use YATT::Fields | ||||||||||
| 13 | 0 | ▶ | (['^nsdict' => sub { {} }] | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.2
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||
| 14 | , ['cf_namespace' => 'yatt'] | ||||||||||
| 15 | , [cf_startline => 1] | ||||||||||
| 16 | , qw(^=tokens | ||||||||||
| 17 | ^cf_filename | ||||||||||
| 18 | cf_nsid | ||||||||||
| 19 | cf_iolayer | ||||||||||
| 20 | ^cf_caller_widget | ||||||||||
| 21 | ) | ||||||||||
| 22 | 7 | ); | |||||||||
| 23 | |||||||||||
| 24 | 731 | ▶ | sub after_configure { | ||||||||
|
Subroutine
after_configure: called CC=4 SCAR=14.0
Pod
undocumented
| |||||||||||
| 25 | 731 | my MY $self = shift; | |||||||||
| 26 | 731 | $self->SUPER::after_configure; | |||||||||
| 27 | 731 | ▶ | if (defined $self->{cf_namespace}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 28 | 731 | my $nsdict = $self->{nsdict} = {}; | |||||||||
| 29 | $self->{cf_namespace} = [$self->{cf_namespace}] | ||||||||||
| 30 | 731 | ▶ | unless ref $self->{cf_namespace} eq 'ARRAY'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 31 | 731 | foreach my $ns (@{$self->{cf_namespace}}) { | |||||||||
| 32 | 1295 | $nsdict->{$ns} = keys %$nsdict; | |||||||||
| 33 | } | ||||||||||
| 34 | } else { | ||||||||||
| 35 | 0 | $self->{nsdict} = {}; | |||||||||
| 36 | } | ||||||||||
| 37 | } | ||||||||||
| 38 | |||||||||||
| 39 | 2 | ▶ | sub in_file { | ||||||||
|
Subroutine
in_file: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 40 | 2 | (my MY $self) = @_; | |||||||||
| 41 | 2 | ▶ | if (defined $$self{cf_filename}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 42 | 1 | " in file $$self{cf_filename}"; | |||||||||
| 43 | } else { | ||||||||||
| 44 | 1 | ''; | |||||||||
| 45 | } | ||||||||||
| 46 | } | ||||||||||
| 47 | |||||||||||
| 48 | 7 | 1; | |||||||||