- Revert the class-overrides-role warning in favor of a solution outside
of the Moose core (Sartak)
+ * Tests
+ - Make Test::Output optional again, since it's only used in a few files
+ (Sartak)
+
0.75_01 Thu, April 23, 2009
* Moose::Meta::Role::Application::ToClass
- Moose now warns about each class overriding methods from roles it
=begin testing-SETUP
BEGIN {
- use Test::Output;
+ eval 'use Test::Output;';
+ if ($@) {
+ diag 'Test::Output is required for this test';
+ ok(1);
+ exit 0;
+ }
}
=end testing-SETUP
use strict;
use warnings;
-use Test::More tests => 2;
-use Test::Output;
+use Test::More;
+BEGIN {
+ eval "use Test::Output;";
+ plan skip_all => "Test::Output is required for this test" if $@;
+ plan tests => 2;
+}
stderr_is( sub { package main; eval 'use Moose' },
"Moose does not export its sugar to the 'main' package.\n",
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 8;
-use Test::Output;
+use Test::More;
+BEGIN {
+ eval "use Test::Output;";
+ plan skip_all => "Test::Output is required for this test" if $@;
+ plan tests => 8;
+}
# this test script ensures that my idiom of:
# role: sub BUILD, after BUILD
use strict;
use warnings;
-use Test::More tests => 45;
+use Test::More;
use Test::Exception;
-use Test::Output;
+BEGIN {
+ eval "use Test::Output;";
+ plan skip_all => "Test::Output is required for this test" if $@;
+ plan tests => 45;
+}
{
use strict;
use warnings;
-use Test::More tests => 6;
-use Test::Output;
+use Test::More;
+BEGIN {
+ eval "use Test::Output;";
+ plan skip_all => "Test::Output is required for this test" if $@;
+ plan tests => 6;
+}
{
package NotMoose;
use strict;
use warnings;
-use Test::More tests => 1;
-use Test::Output;
+use Test::More;
+BEGIN {
+ eval "use Test::Output;";
+ plan skip_all => "Test::Output is required for this test" if $@;
+ plan tests => 1;
+}
{
package ModdedNew;
use strict;
use warnings;
-use Test::More tests => 1;
-use Test::Output;
+use Test::More;
+BEGIN {
+ eval "use Test::Output;";
+ plan skip_all => "Test::Output is required for this test" if $@;
+ plan tests => 1;
+}
{
package Foo;