summaryrefslogtreecommitdiff
path: root/t/lib/Echo.pm
blob: 5bf2ae8253701ced5e2033fc44892d5751ff6cfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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;