local(*Pod::Html::scan_podpath) = sub { # do stuff here # call the old implementation &$old_scan_podpath; # uses @_ };