line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl6::Pod::Block; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=pod |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
Perl6::Pod::Block - base class for Perldoc blocks |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 DESCRIPTION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Perl6::Pod::Block - base class for Perldoc blocks |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=cut |
17
|
|
|
|
|
|
|
|
18
|
3
|
|
|
3
|
|
15
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
94
|
|
19
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
99
|
|
20
|
3
|
|
|
3
|
|
16
|
use base 'Perl6::Pod::Lex::Block'; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
1952
|
|
21
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub get_attr { |
24
|
7
|
|
|
7
|
0
|
18
|
my $self = shift; |
25
|
7
|
|
|
|
|
25
|
my $attr = $self->SUPER::get_attr; |
26
|
|
|
|
|
|
|
#union attr with =config |
27
|
7
|
50
|
|
|
|
23
|
if (my $ctx = $self->context) { |
28
|
7
|
50
|
|
|
|
26
|
if ( my $config = $ctx->get_config( $self->{src_name} ) ) { |
29
|
7
|
|
|
|
|
44
|
while ( my ($k, $v) = each %$config ) { |
30
|
4
|
|
|
|
|
20
|
$attr->{$k} = $v |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
} |
34
|
7
|
|
|
|
|
47
|
$attr; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub context { |
38
|
10
|
|
|
10
|
0
|
30
|
$_[0]->{context}; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub to_xhtml { |
42
|
0
|
|
|
0
|
0
|
|
my ( $self, $to ) = @_; |
43
|
0
|
|
|
|
|
|
warn "export to xhtml not implemented for ".$self->name . " near: " . $self->{''}; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
1; |
46
|
|
|
|
|
|
|
__END__ |