| 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 |  | 2049 | use strict; | 
|  | 2 |  |  |  |  | 6 |  | 
|  | 2 |  |  |  |  | 60 |  | 
| 10 | 2 |  |  | 2 |  | 11 | use warnings; | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 56 |  | 
| 11 | 2 |  |  | 2 |  | 469 | use version; | 
|  | 2 |  |  |  |  | 1964 |  | 
|  | 2 |  |  |  |  | 13 |  | 
| 12 | 2 |  |  | 2 |  | 140 | use Carp; | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 114 |  | 
| 13 | 2 |  |  | 2 |  | 696 | use Data::Dumper qw/Dumper/; | 
|  | 2 |  |  |  |  | 8033 |  | 
|  | 2 |  |  |  |  | 127 |  | 
| 14 | 2 |  |  | 2 |  | 539 | use English qw/ -no_match_vars /; | 
|  | 2 |  |  |  |  | 1920 |  | 
|  | 2 |  |  |  |  | 14 |  | 
| 15 | 2 |  |  | 2 |  | 760 | use base qw/App::TemplateCMD::Command/; | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 1196 |  | 
| 16 |  |  |  |  |  |  |  | 
| 17 |  |  |  |  |  |  | our $VERSION     = version->new('0.6.10'); | 
| 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__ |