NAME
HTML::Latemp::GenMakeHelpers - A Latemp Utility Module.
VERSION
version 0.12.0
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();
VERSION
version 0.12.0
DEPRECATION NOTE
The use of HTML::Latemp::GenMakeHelpers is now discouraged given it seems that for most use cases, it is easier and often even requires less code, to use File::Find::Object or similar directly.
HTML::Latemp::GenMakeHelpers will continue to be maintained and bugs and build/test failures will hopefully be investigated and fixed, but it is hereby deprecated.
For some examples, see:
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.)
An optional parameter is 'out_dir'
which is the path to the output directory of the *.mak files. By default, they get output locally. It was added in version v0.6.1.
An optional parameter is 'out_docs_ext'
which is the extension for the docs files (which should include the leading period) and which defaults to '.wml'
. It was added in version v0.8.0.
An optional parameter is 'docs_build_command_cb'
which is TBD. It was added in version v0.8.0.
An optional parameter is 'images_dest_varname_cb'
which is TBD. It was added in version v0.8.0.
$generator->process_all()
Process all hosts.
INTERNAL METHODS
initialize()
Called by the constructor to initialize the object. Can be sub-classed 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/ .
ACKNOWLEDGEMENTS
SUPPORT
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.
MetaCPAN
A modern, open-source CPAN search engine, useful to view POD in HTML format.
RT: CPAN's Bug Tracker
The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
https://rt.cpan.org/Public/Dist/Display.html?Name=HTML-Latemp-GenMakeHelpers
CPANTS
The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
http://cpants.cpanauthors.org/dist/HTML-Latemp-GenMakeHelpers
CPAN Testers
The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.
http://www.cpantesters.org/distro/H/HTML-Latemp-GenMakeHelpers
CPAN Testers Matrix
The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
http://matrix.cpantesters.org/?dist=HTML-Latemp-GenMakeHelpers
CPAN Testers Dependencies
The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
http://deps.cpantesters.org/?module=HTML::Latemp::GenMakeHelpers
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
AUTHOR
Shlomi Fish <shlomif@cpan.org>
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.
COPYRIGHT AND LICENSE
This software is Copyright (c) 2005 by Shlomi Fish.
This is free software, licensed under:
The MIT (X11) License
SUPPORT
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.
MetaCPAN
A modern, open-source CPAN search engine, useful to view POD in HTML format.
RT: CPAN's Bug Tracker
The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
https://rt.cpan.org/Public/Dist/Display.html?Name=HTML-Latemp-GenMakeHelpers
CPANTS
The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
http://cpants.cpanauthors.org/dist/HTML-Latemp-GenMakeHelpers
CPAN Testers
The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.
http://www.cpantesters.org/distro/H/HTML-Latemp-GenMakeHelpers
CPAN Testers Matrix
The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
http://matrix.cpantesters.org/?dist=HTML-Latemp-GenMakeHelpers
CPAN Testers Dependencies
The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
http://deps.cpantesters.org/?module=HTML::Latemp::GenMakeHelpers
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
AUTHOR
Shlomi Fish <shlomif@cpan.org>
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.
COPYRIGHT AND LICENSE
This software is Copyright (c) 2005 by Shlomi Fish.
This is free software, licensed under:
The MIT (X11) License