| 1 | # Copyrights 2003-2015 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.01. | ||
| 5 | |||
| 6 | use strict; | ||
| 7 | use warnings; | ||
| 8 | |||
| 9 | package OODoc::Format::TemplateMagic; | ||
| 10 | use vars '$VERSION'; | ||
| 11 | $VERSION = '2.01'; | ||
| 12 | |||
| 13 | |||
| 14 | |||
| 15 | sub zoneGetParameters($) | ||
| 16 | { my ($self, $zone) = @_; | ||
| 17 | my $param = ref $zone ? $zone->attributes : $zone; | ||
| 18 | $param =~ s/^\s+//; | ||
| 19 | $param =~ s/\s+$//; | ||
| 20 | |||
| 21 | return () unless length $param; | ||
| 22 | |||
| 23 | return split / /, $param # old style | ||
| 24 | unless $param =~ m/[^\s\w]/; | ||
| 25 | |||
| 26 | # new style | ||
| 27 | my @params = split /\s*\,\s*/, $param; | ||
| 28 | map { (split /\s*\=\>\s*/, $_, 2) } @params; | ||
| 29 | } | ||
| 30 | |||
| 31 | 1; | ||
| 32 |