Steven Haryanto > App-ExecIf-0.01 > exec-if-env

Download:
App-ExecIf-0.01.tar.gz

Annotate this POD

Website

View/Report Bugs
Source  

NAME ^

exec-if-env - Execute command if certain environment variable is true

VERSION ^

version 0.01

SYNOPSIS ^

Usage:

 % exec-if-env RUN somecmd --cmdopt ...

The above will run somecmd only if RUN environment variable is true (with the notion of true follows Perl, i.e undefined, '', and 0 are false and the rest are true).

DESCRIPTION ^

OPTIONS ^

EXIT CODES ^

99 on command-line options error.

Otherwise exit code from command is returned.

FAQ ^

Couldn't the same thing be accomplished with shell?

Yes, you can also do something like this in bash:

 if [[ "$SOMEENV" == 1 ]]; then somecmd --cmdopt ...; fi

But using this utility is simpler and more portable.

TODO ^

SEE ALSO ^

App::ExecIf

exec-if-not-env

HOMEPAGE ^

Please visit the project's homepage at https://metacpan.org/release/App-ExecIf.

SOURCE ^

Source repository is at https://github.com/sharyanto/perl-App-ExecIf.

BUGS ^

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=App-ExecIf

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR ^

Steven Haryanto <stevenharyanto@gmail.com>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2013 by Steven Haryanto.

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

syntax highlighting: