BEGIN { use B::Utils qw(opgrep walkallops_filtered); walkallops_filtered ( # Search for pack() with a constant first arg sub { opgrep( { name => 'pack', first => { name => 'const' } } ) }, sub { my $pack = shift; my $const = $pack->first; # Disallow p and P if ($const->pv =~ m/p/i) { die "Format p or P was used in pack" } } ); }