Subject: | Returning ::Dir when should be returning ::File |
Some of File::ShareDir's functions return paths to files, yet
File::ShareDir::PathClass acts as if they all return paths to dirs.
return dir( $result );
should be
return $sub =~ /_file\z/ ? file( $result ) : dir( $result );