in reply to Overriding built-in function works only via import()?
Yes, it has to be imported from another package to override. That's what subs is for.
$ perl -e' sub readpipe { die }; readpipe("ls"); ' $ perl -e' use subs qw( readpipe ); sub readpipe { die } readpipe("ls"); ' Died at -e line 3.
|
|---|