Revert "Handle huge numbers better"

This reverts commit ef0039bc33.

Abysmal performance: revbank2beancount went from 0.7 to 11 seconds for
revspace's 2024 .revbank.log to date.
This commit is contained in:
Juerd Waalboer 2024-08-28 06:41:02 +02:00
parent 599bf1bc98
commit f16e406063
5 changed files with 41 additions and 54 deletions

View file

@ -21,9 +21,8 @@ sub username($self, $cart, $name, @) {
return REJECT, "Sorry, - + / ^ * are not allowed as the first character."
if $name =~ /^[-+*\/\^]/;
my $num;
return REJECT, "Sorry, that evaluates to the amount $num and can't be an account name."
if defined($num = parse_any_amount($name));
return REJECT, "Sorry, that's too numeric to be a user name."
if defined RevBank::Amount->parse_string($name);
return REJECT, "That name is not available."
if defined parse_user($name, 1);