index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Florian Pritz <bluewind@xinu.at> | 2013-05-22 16:35:23 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2013-05-29 14:17:21 +1000 |
commit | a36d4b2831fdb36a0c8ddaec5a023104932df73d (patch) | |
tree | 647f6b114ccf5280be20c584e6c2c29c65e2133a | |
parent | cbc25c22fcb8ea12ba98386e1489bf8f02e4e86a (diff) |
-rwxr-xr-x | scripts/makepkg-template.pl.in | 22 |
diff --git a/scripts/makepkg-template.pl.in b/scripts/makepkg-template.pl.in index 6997a835..7e377991 100755 --- a/scripts/makepkg-template.pl.in +++ b/scripts/makepkg-template.pl.in @@ -120,21 +120,15 @@ sub process_file { if ($line =~ $template_marker) { my $values = parse_template_line($line, $filename, $linenumber); - given ($values->{command}) { - when (['start', 'input']) { - if ($nesting_level == 0) { - $ret .= load_template($values); - } - } - - when ('end') { - # nothing to do here, just for completeness - } - - default { - die sprintf(gettext("Unknown template marker '%s'\n"), $values->{command}), - "$filename:$linenumber: $line"; + if ($values->{command} eq "start" or $values->{command} eq "input") { + if ($nesting_level == 0) { + $ret .= load_template($values); } + } elsif ($values->{command} eq "end") { + # nothing to do here, just for completeness + } else { + die sprintf(gettext("Unknown template marker '%s'\n"), $values->{command}), + "$filename:$linenumber: $line"; } $nesting_level++ if $values->{command} eq "start"; |