- or download this
17 my $opentag = $config->{'moredata_opentag'} ? $config->{'mor
+edata_opentag'} : '';
19 my $closetag = $config->{'moredata_closetag'} ? $config->{'m
+oredata_closetag'} : ''; # not required
24 $dataname = defined($val->[0]) ? $val->[0] : '' ; #datanam
+e can be empty
25 $format = $val->[1] ? ($val->[1]) : $format_cfg ;
27 $dataname = $val ? $val : '';
- or download this
17 my $opentag = $config->{ moredata_opentag } || '';
19 my $closetag = $config->{ moredata_closetag } || ''; # not r
+equired
24 $dataname = @$val ? $val->[0] : '' ; #dataname can be empt
+y
25 $format = $val->[1] || $format_cfg ;
27 $dataname = $val || '';
- or download this
17 my $opentag = $config->{'moredata_opentag'} ? $config->{'mor
+edata_opentag'} : '';
18 die "MoreData requires an open tag: $!" unless ($opentag);
...
42 length($datasep_cfg) or die "The data separation string must
+ be configured: $!";
43 my $hashsep_cfg = $config->{'moredata_hashsep'} || '';
44 length($hashsep_cfg) or die "The hash separation string must
+ be configured: $!";
- or download this
17 my $opentag = $config->{ moredata_opentag } or die "MoreData
+ requires an open tag\n";
...
41 my $datasep_cfg = $config->{ moredata_datasep } or die "The
+data separation string must be configured\n";
43 my $hashsep_cfg = $config->{ moredata_hashsep } or die "The
+hash separation string must be configured\n";
- or download this
18 die "MoreData requires an open tag: $!" unless ($opentag);
30 die "No format specified in args or configuration: $!" unles
+s $format;
...
52 } else {
53 die "no format : $!";
54 }
- or download this
72 die "Count of $count is not a pair of values in hash assig
+nment of values @array : $!" if ($count != (2 || 0));
- or download this
98 my @substrings = ($content, $datastring);
102 return \@substrings unless ($stringlength);
...
131 return \@substrings;
144 @substrings = ($content, $datastring);
145 return \@substrings;
- or download this
102 return [$content, $datastring] unless ($stringlength);
...
131 return [$content, ''];
145 return [$content, $datastring];
- or download this
148 sub _escape {
149 my $separator = shift;
150 my $regex = '\\' . join('\\', split(/''/, $separator) );
151 return $regex;
152 }
- or download this
64 sub _moredata_hash {
65 my ($datastring, $datasep, $hashsep) = @_;
...
74 }
75 scalar %hash ? \%hash : undef;
76 }