The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::Followme::Variables - Supplies common methods for App::Followme modules

SYNOPSIS

    use App::Followme::Variables;
    my $var = App::Followme::Variables($configuration);
    my $data = $var->set_fields($directory, $filename);

DESCRIPTION

App::Followme::Variables is a base class for all the modules that App::Followme uses to process a website. It is not called directly, App::Followme::HandleSite subclasses it, so all its methods are called through it. Subclasses can create other variables or override the methods in this class that create variables.

FUNCTIONS

The methods which calculate the variables are:

$data = $self->set_fields($directory, $filename);

The main method for getting variables. This method calls the other methods mentioned here. Filename is the file that the variables are being computed for. Directory is used to compute the relative url. The url computed is relative to it.

my $data = $self->build_date($data, $filename);

The variables calculated from the modification time are: weekday, month, monthnum, day, year, hour24, hour, ampm, minute, and second.

my $data = $self->build_is_index($data, $filename);

The variable is_flag is one of the filename is an index file and zero if it is not.

my $data = $self->build_title_from_filename($data, $filename);

The title of the page is derived from the file name by removing the filename extension, removing any leading digits,replacing dashes with spaces, and capitalizing the first character of each word.

$data = $self->build_url($data, $filename);

Build the relative and absolute urls of a web page from a filename.

my $data = $self->internal_fields($data, $filename);

Compute the fields that you must read the file to calculate: title, body, and summary

LICENSE

Copyright (C) Bernie Simon.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Bernie Simon <bernie.simon@gmail.com>