1 package with::TestClass;
9 $class = ref $class || $class || return;
10 bless { id => $args{id}, is => $args{is} }, $class;
15 $self->{is}->($_[0], __PACKAGE__, __PACKAGE__ . '::foo was called');
16 $self->{is}->($_[1], $self->{id}, 'id in foo is correct');
21 $self->{is}->($_[0], __PACKAGE__, __PACKAGE__ . '::bar was called');
22 $self->{is}->($_[1], $self->{id}, 'id in bar is correct');