This is a Raku Object-oriented port of File::Which (CPAN).
File::Which finds the full or relative paths to an executable program on the
system. This is normally the function of which utility which is typically
implemented as either a program or a built in shell command. On some unfortunate
platforms, such as Microsoft Windows it is not provided as part of the core
This module provides a consistent API to this functionality regardless of the
use File::Which :whence;
# All raku executables in PATH
say which('raku', :all);
# First executable in PATH
# Same as which('raku')
To install it using zef (a module management tool bundled with Rakudo Star):
$ zef install File::Which
$ prove --ext .rakutest -ve "raku -I."
- To run all tests including author tests (Please make sure
Test::Meta is installed):
$ zef install Test::META
$ AUTHOR_TESTING=1 prove --ext .rakutest -ve "raku -I."
A bit of tests:
Perl 5 version: