added delimiters_templates report
git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@832
07558da8-63fa-0310-ba24-
9fe276d99e06
}
+=head2 delimiters_templates
+
+
+=cut
+
+sub delimiters_templates {
+ my $self = shift;
+
+ my $t = $self->{_delimiters_templates};
+
+ my $log = $self->_get_logger;
+
+ unless ($t) {
+ $log->warn("called without delimiters");
+ return;
+ }
+
+ my $out;
+
+ foreach my $f (sort { $a <=> $b } keys %$t) {
+ $out .= "$f\n";
+ foreach my $sft (sort { $a cmp $b } keys %{ $t->{$f} }) {
+ $out .= "\t" . $t->{$f}->{$sft} . "\t$sft\n";
+ }
+ }
+
+ return $out;
+}
+
=head1 AUTHOR
Dobrica Pavlinusic, C<< <dpavlin@rot13.org> >>
#!/usr/bin/perl -w
use strict;
-use Test::More tests => 4;
+use Test::More tests => 5;
use Test::Exception;
use blib;
901 => { "^a : / ^b" => 2 },
}, 'just subfields and delimiters');
+ok(my $dt = $v->delimiters_templates, 'delimiters_template');
+diag $dt;