#!/usr/bin/perl
use strict;
use warnings;
# PODNAME: whiff
# ABSTRACT: like which, but finds the first of all the given alternatives

#pod =head1 USAGE
#pod
#pod  whiff <command ... >
#pod
#pod =head1 DESCRIPTION
#pod
#pod F<which> is a useful utility, found on most unix systems.  It gives you the
#pod absolute path for the first occurance of a program in your path.
#pod Unfortunately, it does two stupid things:  first, if it can't find one, it
#pod prints an error message to stdout; secondly, if you give it multiple arguments,
#pod it assumes you want one line per argument, each like calling which
#pod individually.
#pod
#pod F<whiff> assumes that all the arguments form a best-first list of alternatives,
#pod and only prints the path to the first alternative found in the path.  If none
#pod is found, it prints an error (to stderr!) and exits with an error code.
#pod
#pod =cut

use App::Whiff;
App::Whiff->run;

__END__

=pod

=encoding UTF-8

=head1 NAME

whiff - like which, but finds the first of all the given alternatives

=head1 VERSION

version 0.006

=head1 DESCRIPTION

F<which> is a useful utility, found on most unix systems.  It gives you the
absolute path for the first occurance of a program in your path.
Unfortunately, it does two stupid things:  first, if it can't find one, it
prints an error message to stdout; secondly, if you give it multiple arguments,
it assumes you want one line per argument, each like calling which
individually.

F<whiff> assumes that all the arguments form a best-first list of alternatives,
and only prints the path to the first alternative found in the path.  If none
is found, it prints an error (to stderr!) and exits with an error code.

=head1 PERL VERSION SUPPORT

This module has a long-term perl support period.  That means it will not
require a version of perl released fewer than five years ago.

Although it may work on older versions of perl, no guarantee is made that the
minimum required version will not be increased.  The version may be increased
for any reason, and there is no promise that patches will be accepted to lower
the minimum required perl.

=head1 USAGE

 whiff <command ... >

=head1 AUTHOR

Ricardo SIGNES <rjbs@semiotic.systems>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2008 by Ricardo SIGNES.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut
