Permalink
Browse files

releases() in CPAN::Changes also accepts entries ending in '-TRIAL'

  • Loading branch information...
1 parent 55e49f1 commit 8dc3a05ced4f3178e8363b9280160e4af514d5ce @bricas bricas committed Apr 30, 2012
Showing with 17 additions and 6 deletions.
  1. +5 −3 Changes
  2. +12 −3 lib/CPAN/Changes.pm
View
@@ -1,9 +1,11 @@
Revision history for perl module CPAN::Changes
-0.19 TO BE RELEASED
+0.19 2012-04-30
- - Test::CPAN::Changes now accepts version entries ending in '-TRIAL'
- (RT #76882, Karen Etheridge)
+ - Test::CPAN::Changes now accepts version entries ending in '-TRIAL' (RT
+ #76882, Karen Etheridge)
+
+ - releases() in CPAN::Changes also accepts entries ending in '-TRIAL'
0.18 2011-10-18
View
@@ -197,9 +197,18 @@ sub releases {
}
my $sort_function = sub {
- ( eval { version->parse( $a->version ) } || 0 )
- <=> ( eval { version->parse( $b->version ) } || 0 )
- or ( $a->date || '' ) cmp( $b->date || '' );
+ ( eval {
+ ( my $v = $a->version ) =~ s/-TRIAL$//;
+ version->parse( $v );
+ }
+ || 0
+ ) <=> (
+ eval {
+ ( my $v = $b->version ) =~ s/-TRIAL$//;
+ version->parse( $v );
+ }
+ || 0
+ ) or ( $a->date || '' ) cmp( $b->date || '' );
};
my $next_token = $self->{ next_token };

0 comments on commit 8dc3a05

Please sign in to comment.