blib/lib/OODoc/Format/TemplateMagic.pm untested

filter: Statementstmt 0.0% 0 / 19 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 30 SCAR 30.0
CC
4
Cov
0%
zoneGetParameters
20.0
BEGIN
2.0
BEGIN
2.0
CRAP 20.0
1 # Copyrights 2003-2021 by [Mark Overmeer].
2 # For other contributors see ChangeLog.
3 # See the manual pages for details on the licensing terms.
4 # Pod stripped from pm file by OODoc 2.02.
5 # This code is part of perl distribution OODoc. It is licensed under the
6 # same terms as Perl itself: https://spdx.org/licenses/Artistic-2.0.html
7  
8 use strict;
9 use warnings;
10  
11 package OODoc::Format::TemplateMagic;
12 use vars '$VERSION';
13 $VERSION = '2.02';
14  
15  
16  
17 sub zoneGetParameters($)
18 { my ($self, $zone) = @_;
19 my $param = ref $zone ? $zone->attributes : $zone;
20 $param =~ s/^\s+//;
21 $param =~ s/\s+$//;
22  
23 return () unless length $param;
24  
25 return split / /, $param # old style
26 unless $param =~ m/[^\s\w]/;
27  
28 # new style
29 my @params = split /\s*\,\s*/, $param;
30 map { (split /\s*\=\>\s*/, $_, 2) } @params;
31 }
32  
33 1;
34