summaryrefslogtreecommitdiff
path: root/t/lib/Echo.pm
diff options
context:
space:
mode:
Diffstat (limited to 't/lib/Echo.pm')
-rw-r--r--t/lib/Echo.pm22
1 files changed, 22 insertions, 0 deletions
diff --git a/t/lib/Echo.pm b/t/lib/Echo.pm
new file mode 100644
index 0000000..5bf2ae8
--- /dev/null
+++ b/t/lib/Echo.pm
@@ -0,0 +1,22 @@
+use 5.006;
+use strict;
+use warnings;
+
+package Echo;
+use base 'Delta';
+
+use Class::Tiny qw/baz/;
+
+sub BUILD {
+ my $self = shift;
+ $self->baz( $self->bar + 1 );
+}
+
+sub DEMOLISH {
+ my $self = shift;
+ delete $self->{baz}; # or else Delta::DEMOLISH dies
+}
+
+sub a_method { 1 }
+
+1;