#!/usr/bin/env perl
-# This is automatically generated by author/import-moose-test.pl.
-# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
-use t::lib::MooseCompat;
use strict;
use warnings;
use Test::More;
-use Test::Requires {
- 'Test::Output' => '0.01', # skip all if not installed
-};
+BEGIN {
+ eval "use Test::Output;";
+ plan skip_all => "Test::Output is required for this test" if $@;
+ plan tests => 5;
+}
{
package Foo;
qr/^You are overwriting a locally defined method \(clear_d\) with an accessor/, 'clearer overriding gives proper warning');
stderr_like(sub { $foo_meta->add_attribute(e => (is => 'rw')) },
qr/^You are overwriting a locally defined method \(e\) with an accessor/, 'accessor overriding gives proper warning');
-
-stderr_like(sub { $foo_meta->add_attribute(has => (is => 'rw')) },
- qr/^You are overwriting a locally defined function \(has\) with an accessor/, 'function overriding gives proper warning');
-
-done_testing;