File: busy.t

package info (click to toggle)
libio-interactive-perl 1.027-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 156 kB
  • sloc: perl: 132; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 161 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use IO::Interactive qw( busy );

print "1..2\n";

*ARGV = *DATA;

my $fh = busy {
    print "ok 1\n";
    sleep 3;
};

print <$fh>;
print <ARGV>;

__DATA__
ok 2