summaryrefslogtreecommitdiff
path: root/t/bugs/mark_as_methods_overloading_breakage.t
diff options
context:
space:
mode:
Diffstat (limited to 't/bugs/mark_as_methods_overloading_breakage.t')
-rw-r--r--t/bugs/mark_as_methods_overloading_breakage.t33
1 files changed, 33 insertions, 0 deletions
diff --git a/t/bugs/mark_as_methods_overloading_breakage.t b/t/bugs/mark_as_methods_overloading_breakage.t
new file mode 100644
index 0000000..c9e0097
--- /dev/null
+++ b/t/bugs/mark_as_methods_overloading_breakage.t
@@ -0,0 +1,33 @@
+use strict;
+use warnings;
+
+use Test::More;
+use Test::Fatal;
+use Test::Requires {
+ 'MooseX::MarkAsMethods' => 0,
+};
+
+{
+ package Role2;
+ use Moose::Role;
+ use MooseX::MarkAsMethods;
+ use overload q{""} => '_stringify';
+ sub _stringify {ref $_[0]}
+}
+
+{
+ package Class2;
+ use Moose;
+ with 'Role2';
+}
+
+ok(! exception {
+ my $class2 = Class2->new;
+ is(
+ "$class2",
+ 'Class2',
+ 'Class2 got stringification overloading from Role2'
+ );
+}, 'No error creating a Class2 object');
+
+done_testing;