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
|
|
|
|
|
79
|
|
19
|
3
|
|
|
3
|
|
15
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
56
|
|
20
|
3
|
|
|
3
|
|
15
|
use Perl6::Pod::Block; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
73
|
|
21
|
3
|
|
|
3
|
|
13
|
use base 'Perl6::Pod::Block'; |
|
3
|
|
|
|
|
10
|
|
|
3
|
|
|
|
|
541
|
|
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__ |