Add gruntmaster-genallpages and write Makefile.PL
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 1 Dec 2013 20:02:56 +0000 (22:02 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 1 Dec 2013 20:02:56 +0000 (22:02 +0200)
Makefile.PL
gruntmaster-genallpages [new file with mode: 0755]

index ea97420c6aeeee061994f9bf19322a8a1e9cd875..4e2fa24219c2fc0489ce03dbde4d7d82a2f6a3ec 100644 (file)
@@ -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 <marius@ieval.ro>') : ()),
-       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 <marius@ieval.ro>',
+  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 (executable)
index 0000000..2a08af0
--- /dev/null
@@ -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} <ct/*>;
+
+for my $ct ('', <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/*>;
+}
This page took 0.011838 seconds and 4 git commands to generate.