X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FPage.pm;h=d3d25066accaaa17ba53591b76e0755338f413a9;hb=088a8d629e11c01e227ca2dc0c80894f1e1db997;hp=bce618c92b4216900b5327b908a4eeaecdbcd3ae;hpb=e5f2bda6c8984be0c49a3e058a165286791fef51;p=plack-app-gruntmaster.git diff --git a/lib/Gruntmaster/Page.pm b/lib/Gruntmaster/Page.pm index bce618c..d3d2506 100644 --- a/lib/Gruntmaster/Page.pm +++ b/lib/Gruntmaster/Page.pm @@ -4,13 +4,14 @@ use 5.014000; use strict; use warnings; use parent qw/Exporter/; -our @EXPORT_OK = qw/generate/; +our @EXPORT_OK = qw/generate _generate/; use Fcntl qw/:flock/; use File::Basename qw/fileparse/; use File::Slurp qw/write_file/; use IO::Compress::Gzip qw/gzip/; use IO::File; +use Gruntmaster::Data qw/PUBLISH/; our $VERSION = '0.001'; our @generators; @@ -34,6 +35,7 @@ sub declaregen{ my $contest = qr,(?:ct/$component/)?,; declaregen Index => qr,^index$,; declaregen Learn => qr,^learn$,; + declaregen Account => qr,^account$,; declaregen Ct => qr,^ct/index$,; declaregen 'Ct::Entry' => qr,^ct/$component/index$,; declaregen St => qr,^ct/$component/log/st$,; @@ -44,7 +46,7 @@ sub declaregen{ declaregen 'Pb::Entry' => qr,^${contest}pb/$component$,; } -sub generate{ +sub _generate{ my ($path) = @_; my ($path_noext, $ext) = $path =~ m/^(.*)\.(.*)$/; my $basename = fileparse $path_noext; @@ -74,6 +76,10 @@ sub generate{ close $typemap; } +sub generate{ + PUBLISH 'genpage', shift; +} + 1; __END__ # Below is stub documentation for your module. You'd better edit it!