module_path(....,{ all => 1 })

As per #6 , I've taken @perlancar's commit and rebased it vs current head and applied a few fixes, for instance, to retain 5.006 compatibility and to make the logic less error prone.