X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FPage%2FIndex.pm;h=a413e6a9cba5e42a46b98aaeba36519a84bff2e9;hb=bb95f538bf263c0294d87cfb90d58c66117b9aab;hp=5cf282de00963fe064b7b68ef79fbc491181cb0f;hpb=42546e6c1b709dc4c8d8e7048becc14278b6cdf0;p=plack-app-gruntmaster.git diff --git a/lib/Gruntmaster/Page/Index.pm b/lib/Gruntmaster/Page/Index.pm index 5cf282d..a413e6a 100644 --- a/lib/Gruntmaster/Page/Index.pm +++ b/lib/Gruntmaster/Page/Index.pm @@ -3,31 +3,13 @@ package Gruntmaster::Page::Index; use 5.014000; use strict; use warnings; -use parent qw/Exporter/; -our @EXPORT_OK = qw/generate/; +use Gruntmaster::Page::Base index => 'Gruntmaster 6000'; +our @ISA = qw/Gruntmaster::Page::Base/; our $VERSION = '0.001'; -use constant TITLE => 'Gruntmaster 6000'; - -use Fcntl qw/:flock/; -use HTML::Template::Compiled; -use IO::File; -use Gruntmaster::Page qw/header footer/; - -my %templates = ( - en => <<'HTML', +use constant TEMPLATES => { + en => <<'HTML', HTML -); - -$templates{$_} = header($_, TITLE) . $templates{$_} for keys %templates; -$templates{$_} .= footer $_ for keys %templates; - -sub generate{ - my $template = $templates{$_[1]}; - my $htc = HTML::Template::Compiled->new(scalarref => \$template); - IO::File->new('>meta.yml')->close unless -f 'meta.yml'; - flock my $metafh = IO::File->new('output -} +}; 1