build_requires 'Scalar::Util';
build_requires 'Test::More' => '0.88';
build_requires 'Test::Exception';
+build_requires 'Test::Requires';
license 'Perl';
use Scalar::Util qw( refaddr );
use Test::More;
-BEGIN {
- eval 'use Test::Warn';
- plan skip_all => 'These tests require Test::Warn' if $@;
-}
+use Test::Requires {
+ 'Test::Warn' => 0.01, # skip all if not installed
+};
+
{
package MooseX::Singleton::Test;
use Test::More;
-BEGIN {
- eval "require MooseX::StrictConstructor; use Test::Exception;";
- plan skip_all =>
- 'This test requires MooseX::StrictConstructor and Test::Exception'
- if $@;
-}
+use Test::Requires {
+ 'MooseX::StrictConstructor' => 0.01, # skip all if not installed
+ 'Test::Exception' => 0.01,
+};
{
package MySingleton;