Skip to content

Commit

Permalink
add nested mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
monken committed Oct 25, 2011
1 parent d4d5f34 commit 0c6891d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
3 changes: 2 additions & 1 deletion lib/MetaCPAN/Document/File.pm
Expand Up @@ -147,6 +147,7 @@ has module => (
required => 0,
is => 'rw',
isa => Module,
type => 'nested',
coerce => 1,
clearer => 'clear_module'
);
Expand Down Expand Up @@ -277,7 +278,7 @@ sub _build_documentation {
elsif (@indexed) {
return $indexed[0]->name;
}
elsif (!@{ $self->module || [] }) {
elsif ( !@{ $self->module || [] } ) {
return $documentation;
}
else {
Expand Down
19 changes: 15 additions & 4 deletions lib/MetaCPAN/Document/Release.pm
Expand Up @@ -95,15 +95,26 @@ has download_url => ( is => 'ro', required => 1, lazy_build => 1 );
has name => ( is => 'ro', required => 1, index => 'analyzed' );
has version_numified =>
( is => 'ro', required => 1, isa => 'Num', lazy_build => 1 );
has resources => ( is => 'ro', isa => Resources, coerce => 1, dynamic => 1 );
has resources => (
is => 'ro',
isa => Resources,
coerce => 1,
dynamic => 1,
type => 'nested'
);
has abstract => ( is => 'ro', index => 'analyzed' );
has distribution =>
( is => 'ro', required => 1, analyzer => [qw(standard camelcase)] );
has dependency =>
( required => 0, is => 'rw', isa => Dependency, coerce => 1 );
has dependency => (
required => 0,
is => 'rw',
isa => Dependency,
coerce => 1,
type => 'nested'
);
has status => ( is => 'rw', required => 1, default => 'cpan' );
has maturity => ( is => 'ro', required => 1, default => 'released' );
has stat => ( is => 'ro', isa => Stat, dynamic => 1 );
has stat => ( is => 'ro', isa => Stat, dynamic => 1 );
has tests => ( is => 'ro', isa => Tests, dynamic => 1 );
has authorized => ( is => 'ro', required => 1, isa => 'Bool', default => 1 );

Expand Down

0 comments on commit 0c6891d

Please sign in to comment.