IO-Interactive

 view release on metacpan or  search on metacpan

t/is_interactive.t  view on Meta::CPAN

    {
        ok open my $manifest_fh, '<', "MANIFEST";  # any ol file will do.
        ok !is_interactive($manifest_fh);

        my $old_fh = select $manifest_fh;
        ok !is_interactive(), 'defaults to selected filehandle';
        select $old_fh;
    }

    {
        local @ARGV = qw(-);
    
        ok is_interactive();
        
        @ARGV = (1,2,3);
        ok is_interactive();
    }
}

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.085 second using v1.00-cache-2.02-grep-82fe00e-cpan-c9a218a2bbc )