---
name: "Test::Skip::UnlessExistsExecutable"
section: "3pm"
platform: "linux"
package: "libtest-skip-unlessexistsexecutable-perl"
version: "0.041-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Test::Skip::UnlessExistsExecutable"
---

# Test::Skip::UnlessExistsExecutable(3pm)

skips tests unless executable exists

## NAME

Test::Skip::UnlessExistsExecutable - skips tests unless executable exists

## SYNOPSIS

```
    use Test::More tests => 1;
    use Test::Skip::UnlessExistsExecutable qw(
        /usr/bin/rsync
        perl
    );
    use_ok 'Mouse';
    # or
    use Test::More tests => 1;
    use Test::Skip::UnlessExistsExecutable;
    skip_all_unless_exists '/bin/sh';
    skip_all_unless_exists 'perl';
    ok 1;
```

## DESCRIPTION

Test::Skip::UnlessExistsExecutable checks if an executable exist and skips the test if it does not. The intent is to avoid needing to write this sort of boilerplate code:

```
    Test::More;
    BEGIN {
        do_i_have_all_my_optional_deps() ? plan skip_all : plan tests => 42
    }
```

## INTERFACE

Both Test::Skip::UnlessExistsExecutable import method and test\_exists\_executable method take the name of a program or the file path of executable. It checks if the program exists and is executable.

## SOURCE AVAILABILITY

This source is in Github:

```
  http://github.com/dann/p5-test-skip-unlessexistsexecutable
```

## AUTHOR

dann \<techmemo@gmail.com\>

## SEE ALSO

## LICENSE

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