Muster::Hook::FieldSubst - Muster hook for field substitution
version 0.62
# CamelCase plugin name package Muster::Hook::FieldSubst; use Mojo::Base 'Muster::Hook';
Muster::Hook::FieldSubst does field substition; that is, it replaces a "field macro" with the content of that field (aka the meta-data for the Leaf).
The pattern for fields is "{{$fieldname}}".
Initialize, and register hooks.
Process (scan or modify) a leaf object. In scanning phase, this will do simple substitutions of known meta-data (for example, "page"). In assembly phase, it will do the same, but the contents of the Leaf meta-data will likely be more complete.
In either case, this expects the leaf meta-data to be populated.
my $new_leaf = $self->process(%args);
Get the field value for this page.
Get the field value for a different page.
To install Muster, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Muster
CPAN shell
perl -MCPAN -e shell install Muster
For more information on module installation, please visit the detailed CPAN module installation guide.