…urning raw sub, not self-cached version
On Android (and any perl built with -Ud_setlocale), Template::Plugin::Date and its tests cause errors because neither setlocale() nor the locale-related constants are defined, so we need to protect those calls by checking what %Config has to say.
If a template contains a multiline string, within for example a call to a Locale::gettext template function for translation, then the compiled version of the string written to the compiled template file will contain extra indent whitespace due to the regular expressions within the as_perl() function. For example, the template fragment: [% loc("This is a multiline string.") %] will be written to the compiled file as something like $output .= $stash->get(['loc', [ 'This is a multiline string.' ]]); This means that - once a compiled template is loaded in, after say a server restart - the translation stops working because the original string does not exactly match the translation string. The indentation appears to be optional, and is only within compiled template files, so this commit simply removes it.