line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# This file is part of Template-Plugin-TwoStage |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# This software is copyright (c) 2014 by Alexander Kühne. |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
# This is free software; you can redistribute it and/or modify it under |
7
|
|
|
|
|
|
|
# the same terms as the Perl 5 programming language system itself. |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
package # hide from pause |
10
|
|
|
|
|
|
|
Template::Plugin::TwoStage::Test; |
11
|
|
|
|
|
|
|
# ABSTRACT: derived class for self-tests only |
12
|
|
|
|
|
|
|
|
13
|
4
|
|
|
4
|
|
202587
|
use strict; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
153
|
|
14
|
4
|
|
|
4
|
|
24
|
use warnings; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
128
|
|
15
|
4
|
|
|
4
|
|
23
|
use base qw( Template::Plugin::TwoStage ); |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
2229
|
|
16
|
4
|
|
|
4
|
|
5583
|
use File::Temp 'tempdir'; |
|
4
|
|
|
|
|
102849
|
|
|
4
|
|
|
|
|
332
|
|
17
|
4
|
|
|
4
|
|
38
|
use Cwd (); |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
866
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
Template::Plugin::TwoStage->caching_dir( tempdir( "TT_P_TwoStage_XXXXXX", TMPDIR => 1, CLEANUP => 1 ) ); |
20
|
|
|
|
|
|
|
__PACKAGE__->caching_dir( tempdir( "TT_P_TwoStage_XXXXXX", TMPDIR => 1, CLEANUP => 1 ) ); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub read_test_file { |
24
|
3
|
|
|
3
|
1
|
908
|
my ( $class, $test_file ) = @_; |
25
|
3
|
|
|
|
|
20
|
local $/; |
26
|
3
|
50
|
|
|
|
27732
|
open( my $fh, "<", Template::Plugin::TwoStage::_concat_path( Cwd::cwd(), [ 't', $test_file ] ) ) or die $!; |
27
|
3
|
|
|
|
|
141
|
my $tests = <$fh>; |
28
|
3
|
|
|
|
|
72
|
close $fh; |
29
|
3
|
|
|
|
|
324
|
$tests; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub tt_config { |
34
|
5
|
|
|
5
|
1
|
26324
|
my ( $class, $config ) = @_; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
return( |
37
|
3
|
|
|
|
|
223
|
{ INCLUDE_PATH => [ Template::Plugin::TwoStage::_concat_path( Cwd::cwd(), [ 't', 'tt' ] ) ], |
38
|
|
|
|
|
|
|
POST_CHOMP => 1, |
39
|
|
|
|
|
|
|
PLUGIN_BASE => 'Template::Plugin', |
40
|
|
|
|
|
|
|
EVAL_PERL => 1, |
41
|
5
|
100
|
|
|
|
37038
|
( defined $config ? %{$config} : () ) |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |