File Coverage

blib/lib/Perl6/Pod/FormattingCode.pm
Criterion Covered Total %
statement 12 19 63.1
branch 0 4 0.0
condition n/a
subroutine 4 5 80.0
pod 1 1 100.0
total 17 29 58.6


line stmt bran cond sub pod time code
1             package Perl6::Pod::FormattingCode;
2              
3             =pod
4              
5             =head1 NAME
6              
7             Perl6::Pod::FormattingCode - base class for formatting code
8              
9             =head1 SYNOPSIS
10              
11              
12             =head1 DESCRIPTION
13              
14             Perl6::Pod::FormattingCode - base class for formatting code
15              
16             =cut
17              
18 3     3   16 use warnings;
  3         5  
  3         78  
19 3     3   15 use strict;
  3         5  
  3         54  
20 3     3   16 use Perl6::Pod::Block;
  3         4  
  3         117  
21 3     3   14 use base 'Perl6::Pod::Block';
  3         11  
  3         549  
22             our $VERSION = '0.01';
23              
24             =head2 get_attr [code_name]
25              
26             Return formatting code attributes splited with pre-configured via =config.
27             Unless provided return attributes for current .
28              
29             =cut
30              
31             sub get_attr {
32 0     0 1   my $self = shift;
33 0           my $attr = $self->SUPER::get_attr;
34             #union attr with =config
35 0 0         if (my $ctx = $self->context) {
36 0 0         if ( my $config = $ctx->get_config( $self->name . '<>' ) ) {
37 0           while ( my ($k, $v) = each %$config ) {
38 0           $attr->{$k} = $v
39             }
40             }
41             }
42 0           $attr;
43             }
44              
45             1;
46             __END__