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
|
|
1535
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
52
|
|
10
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
43
|
|
11
|
2
|
|
|
2
|
|
317
|
use version; |
|
2
|
|
|
|
|
1502
|
|
|
2
|
|
|
|
|
10
|
|
12
|
2
|
|
|
2
|
|
112
|
use Carp; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
92
|
|
13
|
2
|
|
|
2
|
|
469
|
use Data::Dumper qw/Dumper/; |
|
2
|
|
|
|
|
5394
|
|
|
2
|
|
|
|
|
96
|
|
14
|
2
|
|
|
2
|
|
375
|
use English qw/ -no_match_vars /; |
|
2
|
|
|
|
|
1328
|
|
|
2
|
|
|
|
|
12
|
|
15
|
2
|
|
|
2
|
|
645
|
use base qw/App::TemplateCMD::Command/; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
620
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our $VERSION = version->new('0.6.12'); |
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__ |