From: Marius Gavrilescu Date: Sun, 1 Dec 2013 20:02:56 +0000 (+0200) Subject: Add gruntmaster-genallpages and write Makefile.PL X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=27eae7c3dd4e0ef13f881fe6a2a2458fb1d21346;p=plack-app-gruntmaster.git Add gruntmaster-genallpages and write Makefile.PL --- diff --git a/Makefile.PL b/Makefile.PL index ea97420..4e2fa24 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,13 +1,27 @@ use 5.014000; use ExtUtils::MakeMaker; -# See lib/ExtUtils/MakeMaker.pm for details of how to influence -# the contents of the Makefile that is written. + WriteMakefile( - NAME => 'Gruntmaster::Page', - VERSION_FROM => 'lib/Gruntmaster/Page.pm', # finds $VERSION - PREREQ_PM => {}, # e.g., Module::Name => 1.1 - ($] >= 5.005 ? ## Add these new keywords supported since 5.005 - (ABSTRACT_FROM => 'lib/Gruntmaster/Page.pm', # retrieve abstract from module - AUTHOR => 'Marius Gavrilescu ') : ()), - EXE_FILES => [ qw/gruntmaster-genpage/ ] + NAME => 'Gruntmaster::Page', + VERSION_FROM => 'lib/Gruntmaster/Page.pm', + EXE_FILES => [ qw/gruntmaster-genpage gruntmaster-genallpages/ ], + ABSTRACT_FROM => 'lib/Gruntmaster/Page.pm', + AUTHOR => 'Marius Gavrilescu ', + MIN_PERL_VERSION => '5.14.0', + LICENSE => 'perl', + SIGN => 1, + PREREQ_PM => { + qw/Fcntl 0 + File::Basename 0 + IO::File 0 + POSIX 0 + + File::Slurp 0 + HTML::Template::Compiled 0 + IO::Compress::Gzip 0 + YAML::Any 0/, + }, + META_MERGE => { + dynamic_config => 0, + } ); diff --git a/gruntmaster-genallpages b/gruntmaster-genallpages new file mode 100755 index 0000000..2a08af0 --- /dev/null +++ b/gruntmaster-genallpages @@ -0,0 +1,20 @@ +#!/usr/bin/perl -w +use v5.14; + +use Gruntmaster::Page; + +sub generate{ + my $what = shift; + say STDERR "Generating $what"; + Gruntmaster::Page::generate $what; +} + +generate "${_}index.html" for '', 'ct/'; +generate "$_/index.html" for grep {-d} ; + +for my $ct ('', ) { + generate "${ct}log/index.html"; + generate "${ct}pb/index.html"; + generate "${ct}submit.html"; + generate "$_/index.html" for grep {-d} <${ct}log/*>, <${ct}pb/*>; +}