This is a Perl 6 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 operating system.
This module provides a consistent API to this functionality regardless of the underlying platform.
use File::Which :whence; # All perl executables in PATH say which('perl6', :all); # First executable in PATH say which('perl6'); # Same as which('perl6') say whence('perl6');
To install it using zef (a module management tool bundled with Rakudo Star):
$ zef install File::Which
- To run tests:
$ prove -ve "perl6 -Ilib"
- To run all tests including author tests (Please make sure Test::Meta is installed):
$ zef install Test::META $ TEST_AUTHOR=1 prove -ve "perl6 -Ilib"
Perl 6 port:
- Ahmad M. Zawawi, azawawi on #perl6, https://github.com/azawawi/
A bit of tests:
- Altai-man, sena_kun on freenode, https://github.com/Altai-man/
Perl 5 version:
- Author: Per Einar Ellefsen email@example.com