or download this
Overriding may be done only by importing the name from a module--ordin
+ary
predeclaration isn't good enough. However, the use subs pragma lets yo
+u,
...
use subs 'chdir', 'chroot', 'chmod', 'chown';
chdir $somewhere;
sub chdir { ... }