line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::TemplateCMD::Command::Cat; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# Created on: 2008-03-26 13:43:41 |
4
|
|
|
|
|
|
|
# Create by: ivanw |
5
|
|
|
|
|
|
|
# $Id$ |
6
|
|
|
|
|
|
|
# $Revision$, $HeadURL$, $Date$ |
7
|
|
|
|
|
|
|
# $Revision$, $Source$, $Date$ |
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
1842
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
53
|
|
10
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
49
|
|
11
|
2
|
|
|
2
|
|
372
|
use version; |
|
2
|
|
|
|
|
1589
|
|
|
2
|
|
|
|
|
11
|
|
12
|
2
|
|
|
2
|
|
122
|
use Carp; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
114
|
|
13
|
2
|
|
|
2
|
|
529
|
use Data::Dumper qw/Dumper/; |
|
2
|
|
|
|
|
5676
|
|
|
2
|
|
|
|
|
99
|
|
14
|
2
|
|
|
2
|
|
414
|
use English qw/ -no_match_vars /; |
|
2
|
|
|
|
|
1408
|
|
|
2
|
|
|
|
|
12
|
|
15
|
2
|
|
|
2
|
|
659
|
use base qw/App::TemplateCMD::Command/; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
736
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our $VERSION = version->new('0.6.11'); |
18
|
|
|
|
|
|
|
our @EXPORT_OK = qw//; |
19
|
|
|
|
|
|
|
our %EXPORT_TAGS = (); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub process { |
22
|
0
|
|
|
0
|
1
|
|
my ($self, $cmd, %option) = @_; |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
my ($data) = $self->get_template($option{files}[0], $cmd); |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
|
|
|
$data->{text} =~ s/^\0=__/__/gxms; |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
return $data->{text}; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub help { |
32
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
return <<"HELP"; |
35
|
|
|
|
|
|
|
$0 cat template |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Prints out he contents of a template. |
38
|
|
|
|
|
|
|
HELP |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |