Skip to content

Commit

Permalink
Wrap version parsing in eval()
Browse files Browse the repository at this point in the history
  • Loading branch information
bricas committed Feb 15, 2011
1 parent d2e108b commit fef0baf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Changes
@@ -1,5 +1,9 @@
Revision history for perl module CPAN::Changes

0.07 TO BE RELEASED

- Wrap version parsing in eval()

0.06 2011-02-15

- Add proper version sorting via version.pm
Expand Down
4 changes: 2 additions & 2 deletions lib/CPAN/Changes.pm
Expand Up @@ -8,7 +8,7 @@ use Text::Wrap ();
use Scalar::Util ();
use version ();

our $VERSION = '0.06';
our $VERSION = '0.07';

sub new {
my $class = shift;
Expand Down Expand Up @@ -125,7 +125,7 @@ sub releases {

my $sort_function = sub {
( $a->date || '' ) cmp ( $b->date || '' )
or version->parse( $a->version ) <=> version->parse( $b->version )
or ( eval { version->parse( $a->version ) } || 0 ) <=> ( eval { version->parse( $b->version ) } || 0 )
};

my $next_token = $self->{next_token};
Expand Down

0 comments on commit fef0baf

Please sign in to comment.