use Test::More; use Test::Resub qw/ resub /; my $mocker = resub 'Aclass::do_it', sub { }, capture=>1; my $tobj = BossClass->new(...); $tobj->create(); my $args = $mocker->args; # Tests check the args BossClass provided to the chosen constructor # and the do_it method are as expected