RevBank::Global
Constants and utility functions
Synopsis
use RevBank::Global;
Description
This module unconditionally exports the following symbols into the calling namespace:
Constants
ACCEPT, ABORT, REJECT, NEXT, REDO
Return codes for plugins. See RevBank::Plugins.
They are RevBank::Symbol sentinels, so compare them with ==.
Functions
say
Prints with a newline. Plugins are compiled with use v5.36, so there say
is Perl's built-in instead.
call_hooks($hook, @arguments)
See call_hooks in RevBank::Plugins.
parse_amount($amount)
Returns the amount as a RevBank::Amount if it is well formed, undef if it was
not. The amount may be a sum or difference of amounts, like 21+21 or
5-0.50, as with parse_calc in RevBank::Amount. Throws a
RevBank::Exception::RejectInput (see "Exceptions" in RevBank::Plugins) if the
result is negative or more than 999.00.
Commas are changed to periods so 3,50 and 3.50 both result in 3.50.
parse_user($username)
Returns the canonical username, or undef if the account does not exist.
See parse_user in RevBank::Accounts for the gory details.
now
Returns the current local time as a string like 2026-09-26_13:37:00, i.e.
like ISO 8601 or RFC 3339 but with _ instead of T.
User, Amount, Description, Text, Enum
Parameter types for declared commands. See RevBank::Type.
slurp, peek, spurt, append, rewrite, with_lock, mtime
File access in the data directory. See RevBank::FileIO.
encode_utf8, decode_utf8
See Encode.
Author
Juerd Waalboer #####@juerd.nl