Skip to content

Commit

Permalink
Now extracting the release's abstract from the META.yml.
Browse files Browse the repository at this point in the history
  • Loading branch information
shlomif committed Jun 23, 2009
1 parent e57fefa commit 2fec597
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/CPANHQ/Storage/Release.pm
Expand Up @@ -93,7 +93,13 @@ __PACKAGE__->add_columns(
data_type => 'datetime',
is_nullable => 0,
},
abstract => {
data_type => 'varchar',
size => 512,
is_nullable => 1,
},
);

__PACKAGE__->set_primary_key( qw( id ) );
__PACKAGE__->resultset_attributes( { order_by => [ 'release_date DESC' ] } );
__PACKAGE__->belongs_to(
Expand Down Expand Up @@ -196,6 +202,10 @@ sub _process_meta_yml {
)
);
}

if (defined(my $abstract = $meta_yml->{'abstract'})) {
$self->abstract($abstract);
}
}

=head1 SEE ALSO
Expand Down
3 changes: 3 additions & 0 deletions root/dist/show.tt
Expand Up @@ -3,6 +3,9 @@
[% license = release.license %]
<ul>
<li>
<b>Abstract:</b> [% HTML.escape(release.abstract) %]
</li>
<li>
<b>License:</b>
<a href="[% HTML.escape(license.url) %]">[% HTML.escape(license.name) %]</a>
</li>
Expand Down

0 comments on commit 2fec597

Please sign in to comment.