line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::PSP::Template; |
2
|
5
|
|
|
5
|
|
26
|
use strict; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
184
|
|
3
|
5
|
|
|
5
|
|
26
|
use Carp qw(croak); |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
1481
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub new { |
7
|
13
|
|
|
13
|
0
|
54
|
my ($class,%args) = @_; |
8
|
13
|
|
|
|
|
146
|
return bless { _engine => $args{engine}, _filename => $args{filename} },$class; |
9
|
|
|
|
|
|
|
} |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub run { |
12
|
0
|
|
|
0
|
0
|
0
|
croak "Abstract method Text::PSP::Template::run called!"; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub include { |
16
|
4
|
|
|
4
|
0
|
258
|
my ($self,$file,@args) = @_; |
17
|
4
|
|
|
|
|
14
|
my $dir = $self->{_filename}; |
18
|
4
|
|
|
|
|
22
|
$dir =~ s/[^\/]+$//; |
19
|
4
|
|
|
|
|
21
|
my $template = $self->{_engine}->template("$dir/$file"); |
20
|
4
|
|
|
|
|
8
|
return @{$template->run(@args)}; |
|
4
|
|
|
|
|
14
|
|
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# |
26
|
|
|
|
|
|
|
# Copyright 2002 - 2005 Joost Diepenmaat, jdiepen@cpan.org. All rights reserved. |
27
|
|
|
|
|
|
|
# |
28
|
|
|
|
|
|
|
# This library is free software; you can redistribute it and/or modify it |
29
|
|
|
|
|
|
|
# under the same terms as Perl itself. |
30
|
|
|
|
|
|
|
# |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|