X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FPage%2FAccount.pm;h=20acc6ab30e6731f6f0786acd3d18edb8915426c;hb=2b0036ac8e077cc20cf9db6ff8dad4091ab50cb3;hp=f757e9fe08b859b4853627bac9cf0a1889782ae5;hpb=879063d7deb100035d21ff2be57dce8d090b431f;p=gruntmaster-page.git diff --git a/lib/Gruntmaster/Page/Account.pm b/lib/Gruntmaster/Page/Account.pm index f757e9f..20acc6a 100644 --- a/lib/Gruntmaster/Page/Account.pm +++ b/lib/Gruntmaster/Page/Account.pm @@ -7,12 +7,10 @@ use parent qw/Exporter/; our @EXPORT_OK = qw/generate/; our $VERSION = '0.001'; -use constant TITLE => 'Account'; - use HTML::Template::Compiled; -use Gruntmaster::Page::Common qw/header footer patch_templates/; +use Gruntmaster::Page::Common qw/cook_templates reload_templates/; -my %templates = ( +my %orig_templates = ( en => <<'HTML',
@@ -48,12 +46,10 @@ Confirm new password:
HTML ); -patch_templates %templates, 'account'; - -$templates{$_} = header($_, TITLE) . $templates{$_} for keys %templates; -$templates{$_} .= footer $_ for keys %templates; +my %templates = cook_templates %orig_templates, account => 'Account'; sub generate{ + %templates = cook_templates %orig_templates, account => 'Account' if reload_templates; HTML::Template::Compiled->new(scalarref => \$templates{$_[1]})->output }