line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Templ::Header; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
25
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
20
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
3
|
use Carp qw(carp croak); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
50
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
3
|
use overload '""' => sub { my $self = shift; $$self }; |
|
1
|
|
|
0
|
|
1
|
|
|
1
|
|
|
|
|
7
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub add { |
11
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
12
|
0
|
0
|
0
|
|
|
|
if ( not defined $class || ref $class || $class !~ m/^(\w+\:\:)*\w+$/ ) { |
|
|
|
0
|
|
|
|
|
13
|
0
|
|
|
|
|
|
croak "Can only be called as ".__PACKAGE__."->new"; |
14
|
|
|
|
|
|
|
} |
15
|
0
|
|
|
|
|
|
my $self = \($_[0].''); |
16
|
0
|
|
|
|
|
|
bless $self, $class; |
17
|
0
|
|
|
|
|
|
my $target_class = caller; |
18
|
1
|
|
|
1
|
|
167
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
19
|
|
19
|
1
|
|
|
1
|
|
3
|
no warnings 'once'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
54
|
|
20
|
0
|
|
|
|
|
|
push @{ $target_class.'::TEMPL_HEADERS' }, $self; |
|
0
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
return $self; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
*new = *add; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |