</%doc>
-<%attr>
-</%attr>
-
-<%method preparse>
+<%method execute>
<%args>
-$h
+$string
+$dbh
+$debugf
</%args>
<%perl>
-$_= ${ $h->{String} };
+$_= $string;
s/^\s+//; s/\s+$//;
-my $res= sub {
- my ($capital) = @_;
- push @{ $h->{Results} }, [ $capital ];
- ${ $h->{Canon} }= "$capital PoE";
-};
+my $capital;
+my $canon;
if (!m/\S/) {
+ $canon= '';
} elsif (m/^([1-9]\d*)( PoE)?$/i) {
- $res->( $1 );
+ $capital= $1;
+ $canon= "$capital PoE";
} else {
- ${ $h->{Emsg} }= "Cannot understand capital \`$_'.";
- return;
+ expected_error("Cannot understand capital ".escerrq($_).".");
}
+return ($canon,$capital);
+
</%perl>
</%method>