sub import { ... setup_cachehash($dir) if $dir; } sub setup_cachehash { ... } setup_cachehash("/tmp"); # default