File: busy.t

package info (click to toggle)
libio-interactive-perl 0.0.6-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 96 kB
  • ctags: 6
  • 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