File Coverage

blib/lib/Hub/Parse/TextTemplate.pm
Criterion Covered Total %
statement 6 10 60.0
branch 0 4 0.0
condition n/a
subroutine 2 3 66.6
pod 1 1 100.0
total 9 18 50.0


line stmt bran cond sub pod time code
1             package Hub::Parse::TextTemplate;
2 1     1   6 use strict;
  1         2  
  1         33  
3              
4 1     1   5 use Hub qw/:lib/;
  1         2  
  1         6  
5              
6             push our @ISA, qw/Hub::Parse::Template/;
7              
8             our $VERSION = '4.00043';
9             our @EXPORT = qw//;
10             our @EXPORT_OK = qw//;
11              
12             # ------------------------------------------------------------------------------
13             # refresh - Reset to initial state (persistent object method)
14             # refresh $text
15             # ------------------------------------------------------------------------------
16              
17             sub refresh {
18 0     0 1   my ($self,$opts) = Hub::objopts( \@_ );
19 0 0         my $template = shift or croak "template text required";
20 0           $self->{'parser'} = mkinst( 'StandardParser', $template );
21 0 0         Hub::merge( $self->{'public:'}, @_ ) if @_;
22             }#refresh
23              
24             # ------------------------------------------------------------------------------
25             1;