Permalink
Browse files

use meta.resources.prepan instead of meta.prepan

  • Loading branch information...
1 parent 53baf72 commit 5273405c5cecde7b800a9689ec1c868562f4b336 @kentaro committed Nov 9, 2011
Showing with 5 additions and 3 deletions.
  1. +2 −2 lib/MetaCPAN/Web/Controller/Release.pm
  2. +3 −1 root/inc/release-info.html
@@ -67,10 +67,10 @@ sub index : PathPart('release') : Chained('/') : Args {
my $raw = $source->{raw};
if ($filename =~ /\.ya?ml$/) {
- $meta = YAML::Tiny::Load($raw);
+ $meta = eval { YAML::Tiny::Load($raw) };
}
elsif ($filename =~ /\.json$/) {
- $meta = JSON::XS->new->utf8->decode($raw);
+ $meta = eval { JSON::XS->new->utf8->decode($raw) };
}
}
@@ -21,7 +21,9 @@
<% IF release.tests.size %>(<span style="color: #090"><% release.tests.pass %></span> / <span style="color: #900"><% release.tests.fail %></span> / <% release.tests.na %>)<% END %>
<a href="http://matrix.cpantesters.org/?dist=<% release.name %>" title="Matrix"><img src="/static/icons/grid.png" width="16" height="16" style="vertical-align: bottom; padding: 1px"></a>
</li>
- <% IF meta.prepan %><li><a href="<% meta.prepan %>">PrePAN</a></li><% END %>
+ <% IF meta.resources && meta.resources.prepan %>
+ <li><a href="<% meta.resources.prepan %>">PrePAN</a></li>
+ <% END %>
<% IF release.license %><li>License: <% release.license.join(', ') %></li><% END %>
<% IF versions.size > 1 %>
<select name="release" onchange="document.location.href='/<% IF module.path; 'module'; ELSE; 'release'; END %>/' + this.value">

0 comments on commit 5273405

Please sign in to comment.