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

NAME

HTML::Latemp::GenMakeHelpers - A Latemp Utility Module.

VERSION

version v0.5.3

SYNOPSIS

    use HTML::Latemp::GenMakeHelpers;

    my $generator =
        HTML::Latemp::GenMakeHelpers->new(
            'hosts' =>
            [ map {
                +{ 'id' => $_, 'source_dir' => $_,
                    'dest_dir' => "\$(ALL_DEST_BASE)/$_-homepage"
                }
            } (qw(common t2 vipe)) ],
        );

    $generator->process_all();

API METHODS

my $generator = HTML::Latemp::GenMakeHelpers->new(hosts => [@hosts])

Construct an object with the host defined in @hosts.

An optional parameter is 'filename_lists_post_filter' which must point to a subroutine that accepts a hash reference of 'host', 'bucket', and 'filenames' (which points to an array reference) and returns the modified list of filenames as an array reference (it is called separately for each host and bucket).

An example for it is:

    filename_lists_post_filter => sub {
        my ($args) = @_;
        my $filenames = $args->{filenames};
        if ($args->{host} eq 'src' and $args->{bucket} eq 'IMAGES')
        {
            return [ grep { $_ !~ m#arrow-right# } @$filenames ];
        }
        else
        {
            return $filenames;
        }
    },

(This parameter was added in version 0.5.0 of this module.)

$generator->process_all()

Process all hosts.

INTERNAL METHODS

initialize()

Called by the constructor to initialize the object. Can be sub-classes by derived classes.

$generator->hosts()

Returns an array reference of HTML::Latemp::GenMakeHelpers::HostEntry for the hosts.

$generator->get_initial_buckets($host)

Get the initial buckets for the host $host.

$generator->get_buckets($host)

Get the processed buckets.

$self->get_non_bucketed_files($host)

Get the files that were not placed in any bucket.

$self->place_files_into_buckets($host, $files, $buckets)

Sort the files into the buckets.

$self->get_rules_template($host)

Get the makefile rules template for the host $host.

$self->process_host($host)

Process the host $host.

AUTHOR

Shlomi Fish, http://www.shlomifish.org/ .

BUGS

Please report any bugs or feature requests to bug-html-latemp-genmakehelpers@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=HTML-Latemp-GenMakeHelpers. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2005 Shlomi Fish, All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the MIT X11 License.

AUTHOR

Shlomi Fish <shlomif@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2005 by Shlomi Fish.

This is free software, licensed under:

  The MIT (X11) License

BUGS

Please report any bugs or feature requests on the bugtracker website http://rt.cpan.org/NoAuth/Bugs.html?Dist=HTML-Latemp-GenMakeHelpers or by email to bug-html-latemp-genmakehelpers@rt.cpan.org.

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

SUPPORT

Perldoc

You can find documentation for this module with the perldoc command.

  perldoc HTML::Latemp::GenMakeHelpers

Websites

The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources.

Bugs / Feature Requests

Please report any bugs or feature requests by email to bug-html-latemp-genmakehelpers at rt.cpan.org, or through the web interface at https://rt.cpan.org/Public/Bug/Report.html?Queue=HTML-Latemp-GenMakeHelpers. You will be automatically notified of any progress on the request by the system.

Source Code

The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :)

https://github.com/thewml/latemp

  git clone https://github.com/thewml/latemp