+ - complain loudly if Class::Method::Modifiers is too old (and skip tests)
- don't use $_ as loop variable when calling arbitrary code
1.002004 - 2012-11-02
}
}
+my $vcheck_error;
+
sub _install_single_modifier {
my ($me, @args) = @_;
+ defined($vcheck_error) or $vcheck_error = do {
+ local $@;
+ eval { Class::Method::Modifiers->VERSION(1.05); 1 }
+ ? 0
+ : $@
+ };
+ $vcheck_error and die $vcheck_error;
Class::Method::Modifiers::install_modifier(@args);
}
use Test::More;
BEGIN {
- plan skip_all => "Class::Method::Modifiers not installed"
- unless eval "use Class::Method::Modifiers; 1";
+ plan skip_all => "Class::Method::Modifiers not installed or too old"
+ unless eval "use Class::Method::Modifiers 1.05; 1";
}
my $pass;
use Test::More;
BEGIN {
- plan skip_all => "Class::Method::Modifiers not installed"
- unless eval "use Class::Method::Modifiers; 1";
+ plan skip_all => "Class::Method::Modifiers not installed or too old"
+ unless eval "use Class::Method::Modifiers 1.05; 1";
}
{
use Test::Fatal;
BEGIN {
- plan skip_all => "Class::Method::Modifiers not installed"
- unless eval "use Class::Method::Modifiers; 1";
+ plan skip_all => "Class::Method::Modifiers not installed or too old"
+ unless eval "use Class::Method::Modifiers 1.05; 1";
}
BEGIN {