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