From: Marius Gavrilescu Date: Wed, 25 Mar 2015 15:51:02 +0000 (+0200) Subject: Preload logo X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=444212be46da3c375980b82d3828d7232417e4ac;p=gruntmaster-page.git Preload logo --- diff --git a/lib/Plack/App/Gruntmaster/HTML.pm b/lib/Plack/App/Gruntmaster/HTML.pm index a595331..b4a0800 100644 --- a/lib/Plack/App/Gruntmaster/HTML.pm +++ b/lib/Plack/App/Gruntmaster/HTML.pm @@ -78,9 +78,13 @@ sub _render { $tree->as_HTML; } +my $logo = read_file 'mclogo.svg'; +$logo =~ y/\n//d; +$logo =~ s/(\s+)/ /g; + sub process_skel { my ($tree, %args) = @_; - $tree->fid('logo')->replace_with(literal scalar read_file "mclogo.svg"); + $tree->fid('logo')->replace_with(literal $logo); $tree->content_handler( title => $args{title}, content => literal $args{meat});