The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
use strict;

use Test::More tests => 4;

use Config;
my $perlpath = $Config{perlpath};


is(`cmdvar=outer ENVVAR="rofl copter" $perlpath -I lib bin/unliner t/programs/env.unliner --cmdvar asdf`,
   "rofl copter:asdf\n");

is(`cmdvar=outer ENVVAR="rofl copter" $perlpath -I lib bin/unliner t/programs/env.unliner`,
   "rofl copter:outer\n");

is(`printf "line\n" | $perlpath -I lib bin/unliner t/programs/env2.unliner --blah PREFIX`,
  "PREFIXline\n");

is(`printf "line\n" | $perlpath -I lib bin/unliner t/programs/env2.unliner`,
  "default_prefixline\n");