Gets and sets values from the hash mapping filter flags to functions.
If called with no arguments, returns a hash of all available filter flags and functions:
If called with a filter flag returns the associated function, or if provided with a reference to an array of flag names returns a list of the functions:
If called with one or more pairs of filter flags and associated functions, adds them to the hash. (Any filter that might have existed with the same flag name is overwritten.)
default_filters Optional comma-separated string of filter flags to be applied to all output expressions unless overridden by the n flag.
assemble() This method goes through the lexed template tokens looking for uses of filter flags, which it then rewrites as appropriate method calls before passing the tokens on to the superclass. parse_filters Parses one or more strings containing any number of filter flags and returns a list of flags to be used.
@flags = $mason->parse_filters( @filter_strings );
Flags should be separated by commas, except that the commas may be omitted when using a combination of single-letter flags. Flags are applied from left to right. Any use of the n flag wipes out all flags defined to the left of it.
get_filter_functions Accepts filter flags or function references and returns a list of the corresponding functions. Dies if an unknown filter flag is used.
@functions = $mason->get_filter_functions( @flags_or_functions );
filter Applies one or more filters to the provided content string.
$result = $mason->filter( @flags_or_functions, $content );
For an overview of this templating framework, see Text::MicroMason.
For distribution, installation, support, copyright and license information, see Text::MicroMason::Docs::ReadMe.
|perl v5.20.3||MICROMASON::FILTERS (3)||2008-01-02|