use
Test2::V0;
use
App::Tailor;
my
$str
=
''
;
open
my
$in
,
'<'
, \
$str
or
die
$!;
open
my
$out
,
'>'
, \
$str
or
die
$!;
reset_rules;
ignore
qr/foo/
;
ignore
qr/bar/
;
my
$iter
= itail
$in
;
$out
"foo should be ignored\n"
;
$out
"baz should be printed\n"
;
$out
"bar should be ignored\n"
;
$out
"bat should be printed\n"
;
is
$iter
->(),
"baz should be printed\n"
,
'foo ignored'
;
is
$iter
->(),
"bat should be printed\n"
,
'bar ignored'
;
is
$iter
->(), U,
'closed: undef'
;
done_testing;