my $term; if ($ENV{TESTING}) { $term = Term::ReadLine->new('My Application', \*STDIN, \*STDOUT); } else { $term = Term::ReadLine->new('My Application'); }