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

NAME

App::Followme::FormatPages - Modify pages in a directory to match a prototype

SYNOPSIS

    use App::Followme::FormatPages;
    my $formatter = App::Followme::FormatPages->new($configuration);
    $formatter->run($directory);

DESCRIPTION

App::Followme::FormatPages updates the web pages in a folder to match the most recently modified page. Each web page has sections that are different from other pages and other sections that are the same. The sections that differ are enclosed in html comments that look like

    <!-- section name-->
    <!-- endsection name -->

and indicate where the section begins and ends. When a page is changed, this module checks the text outside of these comments. If that text has changed. the other pages on the site are also changed to match the page that has changed. Each page updated by substituting all its named blocks into corresponding block in the changed page. The effect is that all the text outside the named blocks are updated to be the same across all the web pages.

Updates to the named block can also be made conditional by adding an "in" after the section name. If the folder name after the "in" is included in the prototype_path hash, then the block tags are ignored, it is as if the block does not exist. The block is considered as part of the constant portion of the prototype. If the folder is not in the prototype_path, the block is treated as any other block and varies from page to page.

    <!-- section name in folder -->
    <!-- endsection name -->

Text in conditional blocks can be used for navigation or other sections of the page that are constant, but not constant across the entire site.

CONFIGURATION

The following parameters are used from the configuration:

data_pkg

The name of the module that processes web files. The default value is 'App::Followme::WebData'.

The extension used by web pages. The default value is html

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>