Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #490 from CPAN-API/mickey/update_mapping
update mapping
  • Loading branch information
oalders committed Jun 3, 2016
2 parents 37f52c6 + db0a8bf commit 332c68b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
18 changes: 10 additions & 8 deletions lib/MetaCPAN/Document/File.pm
Expand Up @@ -40,10 +40,11 @@ C<NAME> section. It also sets L</documentation> if it succeeds.
=cut

has section => (
is => 'ro',
isa => Maybe [Str],
lazy => 1,
builder => '_build_section',
is => 'ro',
isa => Maybe [Str],
lazy => 1,
builder => '_build_section',
property => 0,
);

my $RE_SECTION = qr/^\s*(\S+)((\h+-+\h+(.+))|(\r?\n\h*\r?\n\h*(.+)))?/ms;
Expand Down Expand Up @@ -601,10 +602,11 @@ version could not be parsed.
=cut

has version_numified => (
is => 'ro',
isa => Num,
lazy => 1,
builder => '_build_version_numified',
required => 1,
is => 'ro',
isa => Num,
lazy => 1,
builder => '_build_version_numified',
);

sub _build_version_numified {
Expand Down
9 changes: 5 additions & 4 deletions lib/MetaCPAN/Document/Release.pm
Expand Up @@ -143,10 +143,11 @@ has [qw(distribution name)] => (
);

has version_numified => (
is => 'ro',
isa => Num,
lazy => 1,
default => sub {
required => 1,
is => 'ro',
isa => Num,
lazy => 1,
default => sub {
return numify_version( shift->version );
},
);
Expand Down

0 comments on commit 332c68b

Please sign in to comment.