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; |