line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl6::Pod::Directive::config; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=pod |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
Perl6::Pod::Directive::config - handle =config directive |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Block pre-configuration |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=config head1 :numbered |
14
|
|
|
|
|
|
|
=config head2 :like :formatted |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Pre-configuring formatting codes |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=config V<> :allow |
20
|
|
|
|
|
|
|
=config C<> :formatted |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 DESCRIPTION |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
Perl6::Pod::Directive::config - handle =config directive |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
The =config directive allows you to prespecify standard configuration information that is applied to every block of a particular type. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=config BLOCK_TYPE CONFIG OPTIONS |
30
|
|
|
|
|
|
|
= OPTIONAL EXTRA CONFIG OPTIONS |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=cut |
33
|
|
|
|
|
|
|
|
34
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
81
|
|
35
|
3
|
|
|
3
|
|
14
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
65
|
|
36
|
3
|
|
|
3
|
|
13
|
use Perl6::Pod::Block; |
|
3
|
|
|
|
|
21
|
|
|
3
|
|
|
|
|
61
|
|
37
|
3
|
|
|
3
|
|
21
|
use base 'Perl6::Pod::Block'; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
508
|
|
38
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub new { |
41
|
3
|
|
|
3
|
0
|
22
|
my ( $class, %args ) = @_; |
42
|
3
|
|
|
|
|
21
|
my $self = $class->SUPER::new(%args); |
43
|
3
|
|
|
|
|
13
|
my $block_name = $self->{block_name}; |
44
|
3
|
|
|
|
|
21
|
my $attr = $self->get_attr; |
45
|
3
|
|
|
|
|
10
|
my $context = $self->context; |
46
|
3
|
|
|
|
|
11
|
$context->config->{$block_name} = $attr; |
47
|
3
|
|
|
|
|
95
|
return undef; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
1; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
__END__ |