Perl-MinimumVersion
view release on metacpan or search on metacpan
1.37 2014-05-11
- Removed the check for "stacked labels" that I added in 1.36, as it appears
that I misinterpreted what the 5.14 change was, and broke at least one dist.
Commented out the check in MinimumVersion.pm, and the specific subtests.
Apologies to HMBRAND and all others affected
- The way I was comparing versions in one of the new tests in 1.36 wasn't portable
across old versions of Perl. Thanks to Paul Howarth for RT#95528.
1.36 2014-05-09
- CHECK block requires 5.6.2
- UNITCHECK block requires 5.10.0
- Stacked labels on the same statement requires 5.14.0
1.35 2014-05-02
- 'state' requires perl 5.10.0, even if you don't also see
"use feature 'state'", because you can also write "use 5.010" to
enable 'state'. RT#67626
- Dropped the rule that said "use base 'Exporter'" should make a
dependency on Perl 5.008+ RT#89173
- Improved the fix for RT#95023. Thanks again to Paul Howarth.
lib/Perl/MinimumVersion.pm view on Meta::CPAN
return '';
} );
return (defined($version)?"$version.0":undef, $obj);
}
my %SCHEDULED_BLOCK =
(
'INIT' => '5.006',
'CHECK' => '5.006002',
'UNITCHECK' => '5.010',
);
sub _scheduled_blocks
{
my @versions;
my ($version, $obj);
shift->Document->find( sub {
$_[1]->isa('PPI::Statement::Scheduled') or return '';
($_[1]->children)[0]->isa('PPI::Token::Word') or return '';
t/25_scheduled_blocks.t view on Meta::CPAN
use Test::More 0.47;
#use version;
use Perl::MinimumVersion;
my %examples=(
q/ BEGIN { } / => '5.006',
q/ INIT { } / => '5.006',
q/ CHECK { } / => '5.006002',
q/ UNITCHECK { } / => '5.010',
);
plan tests => scalar(keys %examples);
foreach my $example (sort keys %examples) {
my $p = Perl::MinimumVersion->new(\$example);
my $v = $p->minimum_version;
ok( $v == $examples{$example}, $example )
or do { diag "\$\@: $@" if $@ };
}
( run in 0.832 second using v1.01-cache-2.11-cpan-748bfb374f4 )