... if ($capture{$ident}) { local $Storable::Deparse = 1; local $Storable::Eval = 1; my $saved_args = $deep_copy{$ident} ? dclone([@_]) : [@_]; push @{$method_args{$ident}}, $saved_args; } ... #### { my @args; local *Aclass::doit = sub { push @args, [@_]; return 42; }; $boss_worker->doit; is 0+@args, 3, "We got called three times"; is_deeply \@args, [[...], [...], [...] ]; }