Permalink
Browse files

Merge pull request #266 from wolfsage/fix-5-8-0-warnings

Don't throw warnings if perl-5.8.0 has been installed with Perlbrew.
  • Loading branch information...
2 parents 26c1e44 + dc16019 commit d6a6072bcf6485a211a514762d683361f32332de @gugod committed Feb 10, 2013
Showing with 16 additions and 10 deletions.
  1. +9 −8 Makefile.PL
  2. +1 −1 lib/App/perlbrew.pm
  3. +6 −1 t/02.format_perl_version.t
View
@@ -13,14 +13,15 @@ requires
'CPAN::Perl::Releases' => '0.76';
test_requires
- 'Test::Simple' => '0.98',
- 'Test::More' => '0',
- 'Test::Output' => '0',
- 'Test::Exception' => '0',
- 'Test::Spec' => '0',
- 'Path::Class' => '0',
- 'IO::All' => '0',
- 'File::Temp' => '0';
+ 'Test::Simple' => '0.98',
+ 'Test::More' => '0',
+ 'Test::Output' => '0',
+ 'Test::Exception' => '0',
+ 'Test::NoWarnings' => '0',
+ 'Test::Spec' => '0',
+ 'Path::Class' => '0',
+ 'IO::All' => '0',
+ 'File::Temp' => '0';
install_script 'bin/perlbrew';
View
@@ -1123,7 +1123,7 @@ sub format_perl_version {
return sprintf "%d.%d.%d",
substr( $version, 0, 1 ),
substr( $version, 2, 3 ),
- substr( $version, 5 );
+ substr( $version, 5 ) || 0;
}
@@ -6,6 +6,7 @@ use Test::More;
use lib qw(lib);
use App::perlbrew;
+use Test::NoWarnings;
my @test_cases = (
{
@@ -20,9 +21,13 @@ my @test_cases = (
raw => q{5.012002},
parsed => q{5.12.2},
},
+ {
+ raw => q{5.008},
+ parsed => q{5.8.0},
+ },
);
-plan tests => scalar @test_cases;
+plan tests => scalar @test_cases + 1;
{
my $app = App::perlbrew->new();
TEST:

0 comments on commit d6a6072

Please sign in to comment.