App::Followme::BaseData
use App::Followme::BaseData; my $meta = App::Followme::BaseData->new(); my %data = $meta->build($name, $filename);
This module is the base class for all metadata classes and provides the build method used to interface metadata classes with the App::Followme::Template class.
Followme uses templates to construct web pages. These templates contain variables whose values are computed by calling the build method of the metadata object, which is passed as an argument to the template function. The build method returns either a reference to a scalar or list. The names correspond to the variable names in the template. This class contains the build method, which couples the variable name to the metadata object method that computes the value of the variable.
There is only one public method, build.
Build a variable's value. The first argument is the name of the variable to be built. The second argument is the filename the variable is computed for. If the variable returned is a list of files, this variable should be left undefined.
The base metadata class can evaluate the following variables. When passing a name to the build method, the sigil should not be used. All these variables can only be used inside a for block.
A list with all the loop items from the immediately enclosing for block.
A two item list containing the previous and next items in the for block. If the current item is first or last, the corrsponding item in the sequence list will be the empty string.
The count of the current item in the for block.The count starts at one.
One if this is the first item in the for block, zero otherwise.
One if this is the last item in the for block, zero otherwise
The current item in the for block.
The string from the comma separated list of labels that corresponds to the current item in a list.
There is one parameter:
A comma separated list of strings containing a list of labels to apply to the values in a loop. The default value is "previous,next" and is meant to be used with @sequence.
Copyright (C) Bernie Simon.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Bernie Simon <bernie.simon@gmail.com>
To install App::Followme, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Followme
CPAN shell
perl -MCPAN -e shell install App::Followme
For more information on module installation, please visit the detailed CPAN module installation guide.