blib/lib/Template/Nest.pm

filter: Statementstmt 98.5% 209 / 212 Branchbran 80.1% 85 / 106 Conditioncond 75.0% 27 / 36 MC/DCmcdc 40.9% 9 / 22 Subroutinesub 100% 27 / 27 Podpod 86.6% 13 / 15 totaltotal 88.5% 370 / 418 SCAR 44.3
CC
79
Cov
91%
_fill_in
20.8
_render_hash
6.0
_render_array
5.6
CRAP 84.1
↑ Summary
1 package Template::Nest;
2  
3 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 7 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 7 ▶use File::Spec;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 7 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 7 ▶use Data::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 7 our $VERSION = '0.11';
10  
11 sub new{
12 8 ▶ my ($class,%opts) = @_;
Subroutine new: called CC=4 SCAR=13.9
Pod documented
13  
14  
15 # defaults:
16 8 my $self = {
17 comment_delims => [ '<!--','-->' ],
18 token_delims => [ '<%','%>' ],
19 name_label => 'NAME',
20 template_dir => '',
21 template_ext => '.html',
22 show_labels => 0,
23 defaults => {},
24 defaults_namespace_char => '.',
25 fixed_indent => 0,
26 die_on_bad_params => 1,
27 escape_char => "\\"
28 };
29  
30 8 bless $self,$class;
31  
32 8 ▶ if ( %opts ){
Branch: 1 branch
BranchTrueFalseTotal
if (%opts) 7 1 8
33 7 for my $k (keys %opts){
34 39 ▶ confess "$k is not a valid option" unless defined $self->can($k);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $self->can($k) 0 39 39
35 39 $self->$k( $opts{$k} );
36 }
37 }
38  
39 8 return $self;
40 }
41  
42  
43 sub template_dir{
44 87 ▶ my($self,$dir) = @_;
Subroutine template_dir: called CC=4 SCAR=14.1
Pod documented
45 87 ▶ confess "Expected a scalar directory name but got a ".ref($dir) if $dir && ref($dir);
Branch: 1 branch
BranchTrueFalseTotal
if $dir and ref $dir 0 87 87
Condition66%2/3
$dir and ref $dir
!ll&&!rl&&r
7980
MC/DC0%0/2
$dir and ref $dir
$dir ref $dir
Truth table66%2/3
A and B
A= $dirB= ref $dir
ABresult
0X0
100
111
46 87 ▶ $self->{template_dir} = $dir if $dir;
Branch: 1 branch
BranchTrueFalseTotal
if $dir 8 79 87
47 87 return $self->{template_dir};
48 }
49  
50  
51 sub template_hash{
52 4 ▶ my ($self,$template_hash) = @_;
Subroutine template_hash: called CC=2 SCAR=6.9
Pod undocumented
53  
54 4 ▶ $self->{template_hash} = $template_hash if $template_hash;
Branch: 1 branch
BranchTrueFalseTotal
if $template_hash 2 2 4
55 4 return $self->{template_hash};
56 }
57  
58  
59 sub defaults{
60 7 ▶ my ($self,$defaults) = @_;
Subroutine defaults: called CC=3 SCAR=11.0
Pod documented
61  
62 7 ▶ if ( $defaults ){
Branch: 1 branch
BranchTrueFalseTotal
if ($defaults) 5 2 7
63  
64 5 ▶ confess "defaults should be a hashref" unless ref $defaults eq ref {};
Branch: 1 branch
BranchTrueFalseTotal
unless ref $defaults eq ref {} 0 5 5
65 5 $self->{defaults} = $defaults;
66  
67 }
68  
69 7 return $self->{defaults};
70 }
71  
72  
73 sub defaults_namespace_char{
74 30 ▶ my ($self,$char) = @_;
Subroutine defaults_namespace_char: called CC=4 SCAR=13.9
Pod documented
75  
76 30 ▶ if ( defined $char ){
Branch: 1 branch
BranchTrueFalseTotal
if (defined $char) 10 20 30
77 10 ▶ if ( $char eq '' ){
Branch: 1 branch
BranchTrueFalseTotal
if ($char eq '') { } 7 3 10
78 7 $self->{defaults_namespace_char} = '';
79 } else {
80 3 ▶ confess "defaults_namespace_char should be a single character or ''" unless $char =~ /./;
Branch: 1 branch
BranchTrueFalseTotal
unless $char =~ /./ 0 3 3
81 3 $self->{defaults_namespace_char} = $char;
82 }
83 }
84  
85 30 return $self->{defaults_namespace_char};
86 }
87  
88  
89 sub comment_delims{
90 3 ▶ my ($self,$delim1,$delim2) = @_;
Subroutine comment_delims: called CC=3 SCAR=11.0
Pod documented
91 3 ▶ if (defined $delim1 ){
Branch: 1 branch
BranchTrueFalseTotal
if (defined $delim1) 2 1 3
92 2 ▶ $delim2 = $delim2 || '';
Condition50%1/2
$delim2 || ''
l!l
20
MC/DC0%0/1
$delim2 || ''
$delim2
Truth table50%1/2
A
A= $delim2
Aresult
11
00
93 2 $self->{'comment_delims'} = [ $delim1, $delim2 ];
94 }
95 3 return $self->{'comment_delims'};
96 }
97  
98  
99 sub token_delims{
100 45 ▶ my ($self,$delim1,$delim2) = @_;
Subroutine token_delims: called CC=4 SCAR=13.9
Pod documented
101  
102 45 ▶ if (defined $delim1 ){
Branch: 1 branch
BranchTrueFalseTotal
if (defined $delim1) 8 37 45
103  
104 8 ▶ if ( ref $delim1 eq ref [] ){
Branch: 1 branch
BranchTrueFalseTotal
if (ref $delim1 eq ref []) 7 1 8
105 7 ($delim1,$delim2) = @$delim1;
106 }
107  
108 8 ▶ $delim2 ||= '';
Condition50%1/2
$delim2 ||= ""
l!l
80
MC/DC0%0/1
$delim2 ||= ""
$delim2
Truth table50%1/2
A
A= $delim2
Aresult
11
00
109 8 $self->{'token_delims'} = [ $delim1, $delim2 ];
110 }
111 45 return $self->{'token_delims'};
112 }
113  
114  
115  
116 sub show_labels{
117 78 ▶ my ($self,$show) = @_;
Subroutine show_labels: called CC=5 SCAR=16.1
Pod documented
118 78 ▶ confess "Expected a boolean but got $show" if $show && ! ( $show == 0 || $show == 1 );
Branch: 1 branch
BranchTrueFalseTotal
if $show and not $show == 0 || $show == 1 1 77 78
Condition83%5/6
$show and not $show == 0 || $show == 1
!ll&&!rl&&r
7521
$show == 0 || $show == 1
l!l&&r!l&&!r
021
MC/DC66%2/3
$show and not $show == 0 || $show == 1
$show $show == 0 $show == 1
Truth table75%3/4
A and not(B || C)
A= $showB= $show == 0C= $show == 1
ABCresult
0XX0
11X0
1010
1001
119 77 ▶ $self->{show_labels} = $show if defined $show;
Branch: 1 branch
BranchTrueFalseTotal
if defined $show 3 74 77
120 77 return $self->{show_labels};
121 }
122  
123  
124 sub template_ext{
125 87 ▶ my ($self,$ext) = @_;
Subroutine template_ext: called CC=4 SCAR=14.1
Pod documented
126 87 ▶ confess "Expected a scalar extension name but got a ".ref($ext) if defined $ext && ref($ext);
Branch: 1 branch
BranchTrueFalseTotal
if defined $ext and ref $ext 0 87 87
Condition66%2/3
defined $ext and ref $ext
!ll&&!rl&&r
7980
MC/DC0%0/2
defined $ext and ref $ext
defined $ext ref $ext
Truth table66%2/3
A and B
A= defined $extB= ref $ext
ABresult
0X0
100
111
127 87 ▶ $self->{template_ext} = $ext if defined $ext;
Branch: 1 branch
BranchTrueFalseTotal
if defined $ext 8 79 87
128 87 return $self->{template_ext};
129 }
130  
131  
132 sub name_label{
133 245 ▶ my ($self,$label) = @_;
Subroutine name_label: called CC=4 SCAR=14.1
Pod documented
134 245 ▶ confess "Expected a scalar name label but got a ".ref($label) if defined $label && ref($label);
Branch: 1 branch
BranchTrueFalseTotal
if defined $label and ref $label 0 245 245
Condition66%2/3
defined $label and ref $label
!ll&&!rl&&r
23780
MC/DC0%0/2
defined $label and ref $label
defined $label ref $label
Truth table66%2/3
A and B
A= defined $labelB= ref $label
ABresult
0X0
100
111
135 245 ▶ $self->{name_label} = $label if $label;
Branch: 1 branch
BranchTrueFalseTotal
if $label 8 237 245
136 245 return $self->{name_label};
137 }
138  
139  
140 sub fixed_indent{
141 9 ▶ my ($self,$indent) = @_;
Subroutine fixed_indent: called CC=4 SCAR=13.9
Pod documented
142  
143 9 ▶ if ( defined $indent ){
Branch: 1 branch
BranchTrueFalseTotal
if (defined $indent) 7 2 9
144 7 ▶ confess "Expected 0 or 1 but got $indent" unless $indent == 0 or $indent == 1;
Branch: 1 branch
BranchTrueFalseTotal
unless $indent == 0 or $indent == 1 1 6 7
Condition100%3/3
$indent == 0 or $indent == 1
l!l&&r!l&&!r
331
MC/DC100%2/2
$indent == 0 or $indent == 1
$indent == 0 $indent == 1
Truth table100%3/3
A or B
A= $indent == 0B= $indent == 1
ABresult
1X1
011
000
145 6 $self->{fixed_indent} = $indent;
146 }
147  
148 8 return $self->{fixed_indent};
149 }
150  
151  
152 sub die_on_bad_params{
153 8 ▶ my ($self,$should_die) = @_;
Subroutine die_on_bad_params: called CC=4 SCAR=13.9
Pod documented
154  
155 8 ▶ if ( defined $should_die ){
Branch: 1 branch
BranchTrueFalseTotal
if (defined $should_die) 6 2 8
156 6 ▶ confess "Expected 0 or 1 but got $should_die" unless $should_die == 0 or $should_die == 1;
Branch: 1 branch
BranchTrueFalseTotal
unless $should_die == 0 or $should_die == 1 1 5 6
Condition100%3/3
$should_die == 0 or $should_die == 1
l!l&&r!l&&!r
231
MC/DC100%2/2
$should_die == 0 or $should_die == 1
$should_die == 0 $should_die == 1
Truth table100%3/3
A or B
A= $should_die == 0B= $should_die == 1
ABresult
1X1
011
000
157 5 $self->{die_on_bad_params} = $should_die;
158 }
159  
160 7 return $self->{die_on_bad_params};
161 }
162  
163  
164  
165 sub escape_char{
166 7 ▶ my ($self,$char) = @_;
Subroutine escape_char: called CC=4 SCAR=14.0
Pod documented
167  
168 7 ▶ if (defined $char){
Branch: 1 branch
BranchTrueFalseTotal
if (defined $char) 5 2 7
169 5 ▶ confess "escape_char should be a single character or ''" unless $char eq '' or $char =~ /./;
Branch: 1 branch
BranchTrueFalseTotal
unless $char eq "" or $char =~ /./ 0 5 5
Condition66%2/3
$char eq "" or $char =~ /./
l!l&&r!l&&!r
140
MC/DC0%0/2
$char eq "" or $char =~ /./
$char eq "" $char =~ /./
Truth table66%2/3
A or B
A= $char eq ""B= $char =~ /./
ABresult
1X1
011
000
170 5 $self->{escape_char} = $char;
171 }
172  
173 7 return $self->{escape_char};
174 }
175  
176  
177  
178 sub render{
179 134 ▶ my ($self,$comp) = @_;
Subroutine render: called CC=3 SCAR=11.0
Pod documented
180  
181 134 my $html;
182 134 ▶ if ( ref($comp) =~ /array/i ){
Branch: 2 branches
BranchTrueFalseTotal
if (ref($comp) =~ /array/i) { } 14 120 134
elsif (ref($comp) =~ /hash/i) { } 77 43 120
183 14 $html = $self->_render_array( $comp );
184 } elsif( ref( $comp ) =~ /hash/i ){
185 77 $html = $self->_render_hash( $comp );
186 } else {
187 43 $html = $comp;
188 }
189  
190 128 return $html;
191 }
192  
193  
194  
195 sub _render_hash{
196 77 ▶ my ($self,$h) = @_;
Subroutine _render_hash: called CC=6 SCAR=18.0
197  
198 77 ▶ confess "Expected a hashref. Instead got a ".ref($h) unless ref($h) =~ /hash/i;
Branch: 1 branch
BranchTrueFalseTotal
unless ref($h) =~ /hash/i 0 77 77
199  
200 77 my $template_name = $h->{ $self->name_label };
201  
202 77 ▶ confess 'Encountered hash with no name_label ("'.$self->name_label.'"): '.Dumper( $h ) unless $template_name;
Branch: 1 branch
BranchTrueFalseTotal
unless $template_name 0 77 77
203  
204 77 my $param = {};
205  
206 77 foreach my $k ( keys %$h ){
207 159 ▶ next if $k eq $self->name_label;
Branch: 1 branch
BranchTrueFalseTotal
if $k eq $self->name_label 76 83 159
208 83 $param->{$k} = $self->render( $h->{$k} );
209 }
210  
211 75 my $template = $self->_get_template( $template_name );
212 75 my $html = $self->_fill_in( $template_name, $template, $param );
213  
214 72 ▶ if ( $self->show_labels ){
Branch: 1 branch
BranchTrueFalseTotal
if ($self->show_labels) 8 64 72
215  
216 8 my $ca = $self->{comment_delims}->[0];
217 8 my $cb = $self->{comment_delims}->[1];
218  
219 8 $html = "$ca BEGIN $template_name $cb\n$html\n$ca END $template_name $cb\n";
220 }
221  
222 72 return $html;
223  
224 }
225  
226  
227  
228  
229 sub _render_array{
230  
231 14 ▶ my ($self, $arr, $delim) = @_;
Subroutine _render_array: called CC=5 SCAR=17.2
232 14 ▶ confess "Expected an array. Instead got a ".ref($arr) unless ref($arr) =~ /array/i;
Branch: 1 branch
BranchTrueFalseTotal
unless ref($arr) =~ /array/i 0 14 14
233 14 my $html = '';
234 14 foreach my $comp (@$arr){
235 27 ▶ $html.= $delim if ($delim && $html);
Branch: 1 branch
BranchTrueFalseTotal
if $delim and $html 0 27 27
Condition33%1/3
$delim and $html
!ll&&!rl&&r
2700
MC/DC0%0/2
$delim and $html
$delim $html
Truth table33%1/3
A and B
A= $delimB= $html
ABresult
0X0
100
111
236 27 $html.= $self->render( $comp );
237 }
238 13 return $html;
239  
240 }
241  
242  
243  
244 sub _get_template{
245 81 ▶ my ($self,$template_name) = @_;
Subroutine _get_template: called CC=4 SCAR=13.9
246  
247 81 my $template = '';
248 81 ▶ if ( $self->{template_hash} ){
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'template_hash'}) { } 3 78 81
249 3 $template = $self->{template_hash}{$template_name};
250 } else {
251  
252 78 my $filename = File::Spec->catdir(
253 $self->template_dir,
254 $template_name.$self->template_ext
255 );
256  
257 78 my $fh;
258 78 ▶ open $fh,'<',$filename or confess "Could not open file $filename: $!";
Branch: 1 branch
BranchTrueFalseTotal
open $fh, "<", $filename or confess("Could not open file ${filename}: $!") 0 78 78
259  
260 78 my $text = '';
261 78 ▶ while( my $line = <$fh> ){
Branch: 1 branch
BranchTrueFalseTotal
if (defined(my $line = readline $fh)) 335 78 413
262 335 $template.=$line;
263 }
264  
265 }
266  
267 81 $template =~ s/\n$//;
268 81 return $template;
269 }
270  
271  
272  
273  
274 sub params{
275 6 ▶ my ($self,$template_name) = @_;
Subroutine params: called CC=3 SCAR=11.0
Pod undocumented
276  
277 6 my $esc = $self->{escape_char};
278 6 my $template = $self->_get_template( $template_name );
279 6 my @frags = split( /\Q$esc$esc\E/, $template );
280 6 my $tda = $self->{token_delims}[0];
281 6 my $tdb = $self->{token_delims}[1];
282  
283 6 my %rem;
284 6 for my $i (0..$#frags){
285 6 my @f = $frags[$i] =~ m/(?<!\Q$esc\E)\Q$tda\E(.*?)\Q$tdb\E/g;
286 6 for my $f ( @f ){
287 14 $f =~ s/^\s*//;
288 14 $f =~ s/\s*$//;
289 14 $rem{$f} = 1;
290 }
291 }
292  
293 6 my @params = sort(keys %rem);
294 6 return \@params;
295 }
296  
297  
298  
299 sub _token_regex{
300 175 ▶ my ($self,$param_name) = @_;
Subroutine _token_regex: called CC=3 SCAR=11.0
301  
302 175 my $esc = $self->{escape_char};
303 175 my $tda = $self->{token_delims}[0];
304 175 my $tdb = $self->{token_delims}[1];
305  
306 175 ▶ $param_name = '.*?' unless defined $param_name;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $param_name 76 99 175
307  
308 175 my $token_regex = qr/\Q$tda\E\s+$param_name\s+\Q$tdb\E/;
309 175 ▶ if ( $esc ){
Branch: 1 branch
BranchTrueFalseTotal
if ($esc) 175 0 175
310 175 $token_regex = qr/(?<!\Q$esc\E)($token_regex)/;
311 }
312 175 return $token_regex;
313 }
314  
315  
316 sub _fill_in{
317 75 ▶ my ($self,$template_name,$template,$params) = @_;
Subroutine _fill_in: called CC=20 SCAR=30.4
318  
319 75 my $esc = $self->{escape_char};
320 75 my @frags;
321  
322 75 ▶ if ( $esc ){
Branch: 1 branch
BranchTrueFalseTotal
if ($esc) { } 75 0 75
323 75 @frags = split( /\Q$esc$esc\E/, $template );
324 } else {
325 0 @frags = ( $template );
326 }
327  
328 75 foreach my $param_name (keys %$params){
329  
330 78 my $param_val = $params->{$param_name};
331  
332 78 my $replaced = 0;
333  
334 78 ▶ if ( $self->{fixed_indent} ){ #if fixed_indent we need to add spaces during the replacement
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'fixed_indent'}) { } 10 68 78
335 10 for my $i (0..$#frags){
336 10 my $rx = $self->_token_regex( $param_name );
337 10 my @spaces_repl = $frags[$i] =~ m/([^\S\r\n]*)$rx/g;
338  
339 10 ▶ while(@spaces_repl){
Branch: 1 branch
BranchTrueFalseTotal
if (@spaces_repl) 10 10 20
340 10 my $sp = shift @spaces_repl;
341 10 my $repl = shift @spaces_repl;
342 10 my $param_out = $param_val;
343 10 $param_out =~ s/\n/\n$sp/g;
344  
345 10 ▶ if ( $esc ){
Branch: 1 branch
BranchTrueFalseTotal
if ($esc) { } 10 0 10
346 10 ▶ $replaced = 1 if $frags[$i] =~ s/(?<!\Q$esc\E)\Q$repl\E/$param_out/;
Branch: 1 branch
BranchTrueFalseTotal
if $frags[$i] =~ s/(?<!\Q$esc\E)\Q$repl\E/$param_out/ 10 0 10
347 } else {
348 0 ▶ $replaced = 1 if $frags[$i] =~ s/\Q$repl\E/$param_out/;
Branch: 1 branch
BranchTrueFalseTotal
if $frags[$i] =~ s/\Q$repl\E/$param_out/ 0 0 0
349 }
350 }
351 }
352 } else {
353 68 for my $i (0..$#frags){
354 75 my $rx = $self->_token_regex( $param_name );
355 75 ▶ $replaced = 1 if $frags[$i] =~ s/$rx/$param_val/g;
Branch: 1 branch
BranchTrueFalseTotal
if $frags[$i] =~ s/$rx/$param_val/g 64 11 75
356 }
357 }
358  
359 78 ▶ if ( $self->{die_on_bad_params} && $replaced == 0 ){
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"die_on_bad_params"} and $replaced == 0) 3 75 78
Condition100%3/3
$self->{"die_on_bad_params"} and $replaced == 0
!ll&&!rl&&r
4713
MC/DC100%2/2
$self->{"die_on_bad_params"} and $replaced == 0
$self->{"die_on_bad_params"} $replaced == 0
Truth table100%3/3
A and B
A= $self->{"die_on_bad_params"}B= $replaced == 0
ABresult
0X0
100
111
360 3 confess "Could not replace template param '$param_name': token does not exist in template '$template_name'";
361 }
362 }
363  
364 72 for my $i (0..$#frags){
365  
366 76 ▶ if ( %{$self->{defaults}} ){
Branch: 1 branch
BranchTrueFalseTotal
if (%{$self->{"defaults"};}) 18 58 76
367 18 my @rem = $self->_params_in( $frags[$i] );
368 18 my $char = $self->defaults_namespace_char;
369 18 for my $name ( @rem ){
370 14 my @parts = ( $name );
371 14 ▶ @parts = split( /\Q$char\E/, $name ) if $char;
Branch: 1 branch
BranchTrueFalseTotal
if $char 11 3 14
372  
373 14 my $val = $self->_get_default_val( $self->{defaults}, @parts );
374 14 my $rx = $self->_token_regex( $name );
375 14 $frags[$i] =~ s/$rx/$val/g;
376 }
377 }
378  
379 76 my $rx = $self->_token_regex;
380 76 $frags[$i] =~ s/$rx//g;
381 }
382  
383 72 ▶ if ( $esc ){
Branch: 1 branch
BranchTrueFalseTotal
if ($esc) 72 0 72
384 72 for my $i (0..$#frags){
385 76 $frags[$i] =~ s/\Q$esc\E//gs;
386 }
387 }
388  
389 72 ▶ my $text = $esc? join($esc,@frags): $frags[0];
Branch: 1 branch
BranchTrueFalseTotal
$esc ? : 72 0 72
390 72 return $text;
391 }
392  
393  
394 sub _params_in{
395 18 ▶ my ( $self, $text ) = @_;
Subroutine _params_in: called CC=3 SCAR=11.1
396  
397 18 my $esc = $self->{escape_char};
398 18 my $tda = $self->token_delims->[0];
399 18 my $tdb = $self->token_delims->[1];
400  
401 18 my @rem;
402 18 ▶ if ( $esc ){
Branch: 1 branch
BranchTrueFalseTotal
if ($esc) { } 18 0 18
403 18 @rem = $text =~ m/(?<!\Q$esc\E)\Q$tda\E\s+(.*?)\s+\Q$tdb\E/g;
404 } else {
405 0 @rem = $text =~ m/\Q$tda\E\s+(.*?)\s+\Q$tdb\E/g;
406 }
407  
408 18 my %rem;
409 18 for my $name (@rem){
410 14 $rem{$name} = 1
411 }
412  
413 18 return keys %rem;
414 }
415  
416  
417  
418 sub _get_default_val{
419 25 ▶ my ($self,$ref,@parts) = @_;
Subroutine _get_default_val: called CC=4 SCAR=13.9
420  
421 25 ▶ if ( @parts == 1 ){
Branch: 1 branch
BranchTrueFalseTotal
if (@parts == 1) { } 12 13 25
422 12 ▶ my $val = $ref->{$parts[0]} || '';
Condition100%2/2
$$ref{$parts[0]} || ''
l!l
111
MC/DC100%1/1
$$ref{$parts[0]} || ''
$$ref{$parts[0]}
Truth table100%2/2
A
A= $$ref{$parts[0]}
Aresult
11
00
423 12 return $val;
424 } else {
425 13 my $ref_name = shift @parts;
426 13 my $new_ref = $ref->{ $ref_name };
427 13 ▶ return '' unless $new_ref;
Branch: 1 branch
BranchTrueFalseTotal
unless $new_ref 2 11 13
428 11 return $self->_get_default_val( $new_ref, @parts );
429 }
430 }
431  
432  
433  
434 7 1;
435 __END__
↑ Summary