chiark / gitweb /
Minimum trade value feature
[ypp-sc-tools.web-live.git] / yarrg / web / check_poe
similarity index 85%
rename from yarrg/web/check_capitalstring
rename to yarrg/web/check_poe
index 24617d70c32c4d195099a98015bc11a65d1bec0f..46f23d19256b2ca3f64e695c92587a7792e844c3 100644 (file)
@@ -29,7 +29,7 @@
  sponsored by Three Rings.
 
 
- This Mason component simply defines how to interpret capital.
+ This Mason component simply defines how to interpret amounts of poe.
 
 </%doc>
 
@@ -44,19 +44,19 @@ $debugf
 $_= $string;
 s/^\s+//; s/\s+$//;
 
-my $capital;
+my $poe;
 my $canon;
 
 if (!m/\S/) {
        $canon= '';
-} elsif (m/^([1-9]\d*)( PoE)?$/i) {
-       $capital= $1;
-       $canon= "$capital PoE";
+} elsif (m/^([1-9]\d*|0)( PoE)?$/i) {
+       $poe= $1;
+       $canon= "$poe PoE";
 } else {
-       expected_error("Cannot understand capital ".escerrq($_).".");
+       expected_error("Cannot understand poe amount ".escerrq($_).".");
 }
 
-return ($canon,$capital);
+return ($canon,$poe);
 
 </%perl>
 </%method>