| Locale-MakePhrase documentation | view source | Contained in the Locale-MakePhrase distribution. |
Locale::MakePhrase::Utils - Collection of useful functions
This module implements some useful functions used within the Locale::MakePhrase modules.
The functions we export:
Returns true/false indicating if the value is numeric.
Return the left part of a sub-string.
Return the right part of a sub-string.
Trim all leading and trailing whitespace.
Throw an exception, from a caller's perspective (ie: not from within the Locale::MakePhrase modules). This allows us to generate an error message for which the user can figure out what they did wrong.
Note: if you set Locale::MakePhrase::Utils::DIE_FROM_CALLER to a
value other than zero, die_from_caller() will recurse that number of
levels further up the stack backtrace, before die()ing. This allows
you to wrap your $makePhrase->translate(...) calls in a global
wrapper function; eg: by setting the value to 1, the message is
displayed with respect to one level up of your applications' calling
code.
| Locale-MakePhrase documentation | view source | Contained in the Locale-MakePhrase distribution. |