foreach my $callback (@callbacks) { (ref($callback) eq "CODE") || die "$callback is not a code ref"; my @temp_args = @{[@args]}; $callback->(@temp_args); if (verify(@temp_args)) { @args = @temp_args; } else { die "callback did something funky to args"; } }