my $user = $store->user_get($login);
-if ( $user->{usage} > $user->{quota} ) {
- warn $store->status( $login => "ERROR: $login $user->{usage} > quota $user->{quota}" );
- exit 1;
-} else {
- warn $store->status( $login => "OK: $login $user->{usage} < quota $user->{quota}" );
- exit 0;
-}
+my $ok = $user->{usage} <= $user->{quota};
+
+warn $store->status( $login => sprintf 'usage: %s %d %s %d'
+ , ( $ok ? 'OK' : 'ERROR' )
+ , $user->{usage}
+ , ( $ok ? '<=' : '>' )
+ , $user->{quota}
+),$/;
+
+my $exit = $ok ? 0 : 1;
+warn "# exit $exit";
+exit $exit;