#!/usr/bin/perl

=for info

Name: true
Description: exit succesfully
Author: Abigail, abigail@fnx.com
License: perl

=cut

use strict;

my ($VERSION) = '1.3';

my $STATUS = 0;

if (@ARGV) {
    if ($ARGV [0] eq '--version') {
        $0 =~ s{.*/}{};
        print "$0 (Perl bin utils) $VERSION\n";
        exit;
    }
    if ($ARGV [0] eq '--help') {
        $0 =~ s{.*/}{};
        my $success = $STATUS ? "failure" : "success";
        print <<EOF;
Usage: $0 [OPTION]

Exit with a $success status.

Options:
       --version:  Print version number, then exit.
       --help:     Print usage, then exit.
EOF
        exit;
    }
}

exit $STATUS;

__END__

=pod

=head1 NAME

true - Exit succesfully

=head1 SYNOPSIS

(true | false) [OPTION]

=head1 DESCRIPTION

I<true> exits succesfully. I<false> exits unsuccesfully.

=head2 OPTIONS

I<true> and I<false> accept the following options:

=over 4

=item --help

Print out a short help message, then exit.

=item --version

Print out its version number, then exit.

=back

=head1 ENVIRONMENT

The working of I<true> and I<false> are not influenced by any
environment variables.

=head1 BUGS

I<true> and I<false> have no known bugs.

=head1 AUTHOR

The Perl implementation of I<true> and I<false>
was written by Abigail, I<abigail@fnx.com>.

=head1 COPYRIGHT and LICENSE

This program is copyright by Abigail 1999.

This program is free and open software. You may use, modify, distribute
and sell this program (and any modified variants) in any way you wish,
provided you do not restrict others to do the same.

=cut

