X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FPage%2FLog%2FEntry.pm;h=4b7a70df732b645b4622988941d8278d9c53a5e9;hb=fe78f0c128c35e68e65850b02057997bad6717fe;hp=08230bfaf8fa475895960943e58a5aa5dd98e340;hpb=42546e6c1b709dc4c8d8e7048becc14278b6cdf0;p=plack-app-gruntmaster.git diff --git a/lib/Gruntmaster/Page/Log/Entry.pm b/lib/Gruntmaster/Page/Log/Entry.pm index 08230bf..4b7a70d 100644 --- a/lib/Gruntmaster/Page/Log/Entry.pm +++ b/lib/Gruntmaster/Page/Log/Entry.pm @@ -33,19 +33,20 @@ $templates{$_} .= footer $_ for keys %templates; sub generate{ my ($path, $lang) = @_; - $path = ($path =~ m,log/(.*)/index,)[0]; + $id = ($path =~ m,log/(.*)/index,)[0]; + $path =~ s,/index\.html,,; my $template = $templates{$lang}; my $htc = HTML::Template::Compiled->new(scalarref => \$template); - flock my $metafh = IO::File->new("new("<$path/meta.yml"), LOCK_SH; + my $meta = LoadFile "$path/meta.yml"; my @tests = map { $_->{time} = sprintf "%.4fs", $_->{time}; $_ } @{$meta->{results}}; - $htc->param(id => $path); + $htc->param(id => $id); $htc->param(tests => \@tests); $htc->output }