]> iEval git - gruntmaster-page.git/commitdiff
Fix compile error in ::Log::Entry and warning in ::Log
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 1 Dec 2013 19:42:00 +0000 (21:42 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 1 Dec 2013 19:42:00 +0000 (21:42 +0200)
lib/Gruntmaster/Page/Log.pm
lib/Gruntmaster/Page/Log/Entry.pm

index d276f558b0b38313440da4cc5e850fa8a30caec7..957b5102e64b031b2d11b914a9a50de9a6dcf91d 100644 (file)
@@ -46,7 +46,7 @@ sub generate{
   my @log = sort { $b->{id} <=> $a->{id} } map {
        my $meta = LoadFile "$path/$_/meta.yml";
        +{ id => $_,
-          date => strftime ('%c' => localtime $meta->{date}),
+          date => (exists $meta->{date} ? strftime ('%c' => localtime $meta->{date}) : '?'),
           user => $meta->{user},
           result => $meta->{result},
           name => $meta->{name},
index 4b7a70df732b645b4622988941d8278d9c53a5e9..4dd13baaef7eeb54fdd4952cdef894e857a778a6 100644 (file)
@@ -33,7 +33,7 @@ $templates{$_} .= footer $_ for keys %templates;
 
 sub generate{
   my ($path, $lang) = @_;
-  $id = ($path =~ m,log/(.*)/index,)[0];
+  my $id = ($path =~ m,log/(.*)/index,)[0];
   $path =~ s,/index\.html,,;
   my $template = $templates{$lang};
 
This page took 0.022896 seconds and 4 git commands to generate.