Hello community,

here is the log from the commit of package perl-IO-Pager for openSUSE:Factory 
checked in at 2018-11-12 09:41:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-IO-Pager (Old)
 and      /work/SRC/openSUSE:Factory/.perl-IO-Pager.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-IO-Pager"

Mon Nov 12 09:41:09 2018 rev:23 rq:647378 version:0.40

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-IO-Pager/perl-IO-Pager.changes      
2017-10-09 19:48:14.127546185 +0200
+++ /work/SRC/openSUSE:Factory/.perl-IO-Pager.new/perl-IO-Pager.changes 
2018-11-12 09:41:12.337207847 +0100
@@ -1,0 +2,6 @@
+Thu Nov  8 15:44:09 UTC 2018 - Dirk Stoecker <opens...@dstoecker.de>
+
+- updated to 0.40
+   see /usr/share/doc/packages/perl-IO-Pager/CHANGES
+
+-------------------------------------------------------------------

Old:
----
  IO-Pager-0.39.tgz

New:
----
  IO-Pager-0.40.tgz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-IO-Pager.spec ++++++
--- /var/tmp/diff_new_pack.q84STF/_old  2018-11-12 09:41:12.789207200 +0100
+++ /var/tmp/diff_new_pack.q84STF/_new  2018-11-12 09:41:12.793207195 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-IO-Pager
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,18 +12,18 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:           perl-IO-Pager
-Version:        0.39
+Version:        0.40
 Release:        0
 %define cpan_name IO-Pager
 Summary:        Select a pager and pipe text to it if destination is a TTY
-License:        GPL-1.0+ or Artistic-1.0
+License:        GPL-1.0-or-later OR Artistic-1.0
 Group:          Development/Libraries/Perl
-Url:            http://search.cpan.org/dist/IO-Pager/
+Url:            https://metacpan.org/release/%{cpan_name}
 Source0:        
https://cpan.metacpan.org/authors/id/J/JP/JPIERCE/%{cpan_name}-%{version}.tgz
 Source1:        cpanspec.yml
 BuildArch:      noarch
@@ -47,14 +47,14 @@
 appropriate subclass for implementation specific details.
 
 %prep
-%setup -q -n %{cpan_name}-%{version}
+%setup -q -n %{cpan_name}-0.4
 
 %build
-%{__perl} Makefile.PL INSTALLDIRS=vendor
-%{__make} %{?_smp_mflags}
+perl Makefile.PL INSTALLDIRS=vendor
+make %{?_smp_mflags}
 
 %check
-%{__make} test
+make test
 
 %install
 %perl_make_install

++++++ IO-Pager-0.39.tgz -> IO-Pager-0.40.tgz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/IO-Pager-0.39/CHANGES new/IO-Pager-0.4/CHANGES
--- old/IO-Pager-0.39/CHANGES   2017-05-13 18:55:13.000000000 +0200
+++ new/IO-Pager-0.4/CHANGES    2018-10-11 04:49:52.000000000 +0200
@@ -1,5 +1,14 @@
 Revision history for Perl extension IO::Pager.
 
+0.40   Mon Oct 08 2018
+       And a tee(1)-like feature via binmode().
+
+       Fix some interactive tests; 07 and 10.
+
+       Document potentially surprising behaviors in IO::Pager::Buffered.
+
+        One more bloody RT#121450; missed 11-redirect-oo.pl
+
 0.39   Sat May 13 2017
        Rename t.pl to test.pl and alter behavior to address RT#120618
        i.e; MakeMaker's "helpfulness"; alternative is explicitly list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/IO-Pager-0.39/MANIFEST new/IO-Pager-0.4/MANIFEST
--- old/IO-Pager-0.39/MANIFEST  2016-03-01 04:36:20.000000000 +0100
+++ new/IO-Pager-0.4/MANIFEST   2018-10-08 21:49:45.000000000 +0200
@@ -26,6 +26,8 @@
 t/11-redirect-oo.t
 t/12-preservelayers_interactive.t
 t/13-eof_interactive.t
+t/14-tee_interactive.t
+t/15-log_interactive.t
 t/TestUtils.pm
 META.yml                                 Module YAML meta-data (added by 
MakeMaker)
 META.json                                Module JSON meta-data (added by 
MakeMaker)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/IO-Pager-0.39/META.json new/IO-Pager-0.4/META.json
--- old/IO-Pager-0.39/META.json 2017-05-13 18:55:15.000000000 +0200
+++ new/IO-Pager-0.4/META.json  2018-10-11 04:49:57.000000000 +0200
@@ -4,13 +4,13 @@
       "Jerrad Pierce <jpie...@cpan.org>, Florent Angly 
<florent.an...@gmail.com>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter 
version 2.150010",
+   "generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter 
version 2.150010",
    "license" : [
       "unknown"
    ],
    "meta-spec" : {
       "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec";,
-      "version" : "2"
+      "version" : 2
    },
    "name" : "IO-Pager",
    "no_index" : {
@@ -49,6 +49,6 @@
       }
    },
    "release_status" : "stable",
-   "version" : "0.39",
-   "x_serialization_backend" : "JSON::PP version 2.27400"
+   "version" : 0.4,
+   "x_serialization_backend" : "JSON::PP version 2.97001"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/IO-Pager-0.39/META.yml new/IO-Pager-0.4/META.yml
--- old/IO-Pager-0.39/META.yml  2017-05-13 18:55:15.000000000 +0200
+++ new/IO-Pager-0.4/META.yml   2018-10-11 04:49:56.000000000 +0200
@@ -11,7 +11,7 @@
 configure_requires:
   ExtUtils::MakeMaker: '0'
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 
2.150010'
+generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 
2.150010'
 license: unknown
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -31,5 +31,5 @@
   Symbol: '0'
   Tie::Handle: '0'
   base: '0'
-version: '0.39'
+version: 0.4
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/IO-Pager-0.39/TODO new/IO-Pager-0.4/TODO
--- old/IO-Pager-0.39/TODO      2016-01-02 05:46:27.000000000 +0100
+++ new/IO-Pager-0.4/TODO       2018-10-10 05:35:13.000000000 +0200
@@ -1,18 +1,17 @@
 Important things here and in code flagged with XXX
 
+0.40
+       Verify all sample code works, esp. STDOUT
+
+       Fix STDOUT?! Need tied_fh (store as dumped field for later eval?)
+                    Dupiness?
+
 0.35
 
        Odd failure of test 11 under tcsh and win-bash because
        *reference* has extra trailing newline.
 
 0.30
-       Create a tee sub-class/layer?
-              recommend PerlIO::Util's :tee in the dox, but provide
-              a simplified (single file?) pure-perl implementation too,
-              via a maethod to wrap an existing IO::Pager handle? (0.32)
-
-              Might simplify new/open 'procedural' arg-passing mess? (0.33+)
-
        XXX Complete the ::less subclass to lump all non-interactive
        fallback behavior together? (See pagerless branch in git)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/IO-Pager-0.39/lib/IO/Pager/Buffered.pm 
new/IO-Pager-0.4/lib/IO/Pager/Buffered.pm
--- old/IO-Pager-0.39/lib/IO/Pager/Buffered.pm  2015-02-25 17:52:18.000000000 
+0100
+++ new/IO-Pager-0.4/lib/IO/Pager/Buffered.pm   2018-10-11 04:44:45.000000000 
+0200
@@ -1,5 +1,5 @@
 package IO::Pager::Buffered;
-our $VERSION = 0.30;
+our $VERSION = 0.40;
 
 use strict;
 use base qw( IO::Pager );
@@ -71,6 +71,8 @@
 
 __END__
 
+=pod
+
 =head1 NAME
 
 IO::Pager::Buffered - Pipe deferred output to PAGER if destination is a TTY
@@ -79,7 +81,7 @@
 
   use IO::Pager::Buffered;
   {
-    local $token = IO::Pager::Buffered::open *STDOUT;
+    local $token = IO::Pager::Buffered::open local *STDOUT;
     print <<"  HEREDOC" ;
     ...
     A bunch of text later
@@ -105,12 +107,13 @@
 or not to pipe a filehandle's output to a program specified in I<PAGER>;
 determined and set by IO::Pager at runtime if not yet defined.
 
-This subclass buffers all output for display upon exiting the current scope.
-If this is not what you want look at another subclass such as
-L<IO::Pager::Unbuffered>. While probably not common, this may be useful in
-some cases,such as buffering all output to STDOUT while the process occurs,
-showing only warnings on STDERR, then displaying the output to STDOUT after.
-Or alternately letting output to STDOUT slide by and defer warnings for later
+This subclass buffers all output for display until execution returns to the
+parent scope or a manual L</flush> occurs.L<*|/close> If this is not what
+you want look at another subclass such as L<IO::Pager::Unbuffered>. While
+probably not common, this may be useful in some cases, such as buffering all
+output to STDOUT while the process occurs so that warnings on STDERR are more
+visible, then displaying the less urgent output from STDOUT after. Or,
+alternately, letting output to STDOUT slide by and defer warnings for later
 perusal.
 
 =head1 METHODS
@@ -121,14 +124,25 @@
 
 Instantiate a new IO::Pager to paginate FILEHANDLE if necessary.
 I<Assign the return value to a scoped variable>. Output does not
-occur until all references to this variable are destroyed eg;
-upon leaving the current scope. See L</DESCRIPTION>.
+occur until the filehandle is L</flush>ed or L</close>d.
 
 =head2 new( [FILEHANDLE] )
 
 Almost identical to open, except that you will get an L<IO::Handle>
 back if there's no TTY to allow for IO::Pager agnostic programming.
 
+=head2 close( FILEHANDLE )
+
+Flushes the buffer to the pager and closes the filehandle for writing.
+Normally, when using a lexically or locally scoped variable to hold the
+token supplied by L</open>, explicit calls to close are unnecessary.
+However, if you are using IO::Pager::Buffered with an unlocalized STDOUT
+or STDERR you close the filehandle to display the buffered content or
+wait for global garbage cleaning upon program termination.
+
+Alternatively, you might prefer to use a non-core filehandle with IO::Pager,
+and call L<perlfunc/select> to make it the default for output.
+
 =head2 tell( FILEHANDLE )
 
 Returns the size of the buffer in bytes.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/IO-Pager-0.39/lib/IO/Pager/Page.pm 
new/IO-Pager-0.4/lib/IO/Pager/Page.pm
--- old/IO-Pager-0.39/lib/IO/Pager/Page.pm      2015-02-22 16:21:36.000000000 
+0100
+++ new/IO-Pager-0.4/lib/IO/Pager/Page.pm       2018-10-11 04:44:56.000000000 
+0200
@@ -23,6 +23,8 @@
 
 __END__
 
+=pod
+
 =head1 NAME
 
 IO::Pager::Page - Emulate IO::Page, pipe STDOUT to a pager if STDOUT is a TTY
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/IO-Pager-0.39/lib/IO/Pager/Unbuffered.pm 
new/IO-Pager-0.4/lib/IO/Pager/Unbuffered.pm
--- old/IO-Pager-0.39/lib/IO/Pager/Unbuffered.pm        2015-02-25 
03:36:52.000000000 +0100
+++ new/IO-Pager-0.4/lib/IO/Pager/Unbuffered.pm 2018-10-11 04:44:36.000000000 
+0200
@@ -40,6 +40,8 @@
 
 __END__
 
+=pod
+
 =head1 NAME
 
 IO::Pager::Unbuffered - Pipe output to PAGER if destination is a TTY
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/IO-Pager-0.39/lib/IO/Pager.pm 
new/IO-Pager-0.4/lib/IO/Pager.pm
--- old/IO-Pager-0.39/lib/IO/Pager.pm   2017-05-13 17:50:13.000000000 +0200
+++ new/IO-Pager-0.4/lib/IO/Pager.pm    2018-10-11 04:44:11.000000000 +0200
@@ -1,5 +1,5 @@
 package IO::Pager;
-our $VERSION = 0.39; #Really 0.36
+our $VERSION = 0.40; #Untouched since 0.40
 
 use 5.008; #At least, for decent perlio, and other modernisms
 use strict;
@@ -144,7 +144,11 @@
   unless ( $PAGER ){
     die "The PAGER environment variable is not defined, you may need to set it 
manually.";
   }
-  my($real_fh, $child);
+  my($real_fh, $child, $dupe_fh);
+# XXX What about localized GLOBs?!
+#  if( $tied_fh =~ /\*(?:\w+::)?STD(?:OUT|ERR)$/ ){
+#      open($dupe_fh, '>&', $tied_fh) or warn "Unable to dupe $tied_fh";
+#  }
   if ( $child = CORE::open($real_fh, '|-', $PAGER) ){
     my @oLayers = PerlIO::get_layers($tied_fh, details=>1, output=>1);
     my $layers = '';
@@ -162,6 +166,8 @@
   }
   return bless {
                 'real_fh' => $real_fh,
+#              'dupe_fh' => $dupe_fh,
+               'tied_fh' => "$tied_fh", #Avoid self-reference leak
                 'child'   => $child,
                'pager'   => $PAGER,
                }, $class;
@@ -170,7 +176,12 @@
 
 sub BINMODE {
   my ($self, $layer) = @_;
-  CORE::binmode($self->{real_fh}, $layer||':raw');
+  if( $layer =~ /^:LOG\((>{0,2})(.*)\)$/ ){
+    open($self->{LOG}, $1||'>', $2||"$$.log") or die $!;
+  }
+  else{
+    CORE::binmode($self->{real_fh}, $layer||':raw');
+  }
 }
 
 sub WNOHANG();
@@ -185,13 +196,17 @@
   $SIG{PIPE} = sub { $SIGPIPE = 1 unless $ENV{IP_EOF};
                     CORE::close($self->{real_fh});
                     waitpid($self->{child}, WNOHANG);
-                    CORE::open($self->{real_fh}, '>&1'); };
+                    CORE::open($self->{real_fh}, '>&1');
+
+                    close($self->{LOG});
+                  };
   return $SIGPIPE;
 }
 
 
 sub PRINT {
   my ($self, @args) = @_;
+  CORE::print {$self->{LOG}} @args if exists($self->{LOG});
   CORE::print {$self->{real_fh}} @args or die "Could not print to PAGER: $!\n";
 }
 
@@ -218,9 +233,15 @@
 }
 
 
+sub FILENO {
+  CORE::fileno($_[0]->{real_fh});
+}
+
 sub CLOSE {
   my ($self) = @_;
   CORE::close($self->{real_fh});
+#  untie($self->{tied_fh});
+#  *{$self->{tied_fh}} = *{$self->{dupe_fh}};
 }
 
 *DESTROY = \&CLOSE;
@@ -243,6 +264,7 @@
 1;
 
 __END__
+=pod
 
 =head1 NAME
 
@@ -388,6 +410,27 @@
 Used to set the I/O layer a.k.a. discipline of a filehandle,
 such as C<':utf8'> for UTF-8 encoding.
 
+=head3 :LOG([>>FILE])
+
+IO::Pager implements a pseudo-IO-layer for capturing output and sending it
+to a file, similar to L<tee(1)>. Although it is limited to one file, this
+feature is pure-perl and adds no dependencies.
+
+You may indicate what file to store in parentheses, otherwise the default is
+C<$$.log>. You may also use an implicit (no indicator) or explicit (I<E<gt>>)
+indicator to overwrite an existing file, or an explicit (I<E<gt>E<gt>>) for
+appending to a log file. For example:
+
+    binmode(*STDOUT, ':LOG(clobber.log)');
+    ...
+    $STDOUT->binmode(':LOG(>>noclobber.log)');
+
+For full tee-style support, use L<PerlIO::Util> like so:
+
+    binmode(*STDOUT, ":tee(TH)");
+    #OR
+    $STDOUT->binmode(':tee(TH)');
+
 =head2 eof( FILEHANDLE )
 
 Used in the eval-until-eof idiom below, I<IO::Pager> will handle broken pipes
@@ -409,6 +452,10 @@
 use the I<--no-init> option by setting I<$ENV{IP_EOF}='X'> to prevent the
 paged output from being erased when the pager exits.
 
+=head2 fileno( FILEHANDLE )
+
+Return the filehandle number of the write-only pipe to the pager.
+
 =head2 print( FILEHANDLE LIST )
 
 print() to the filehandle.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/IO-Pager-0.39/t/07-oo_interactive.t 
new/IO-Pager-0.4/t/07-oo_interactive.t
--- old/IO-Pager-0.39/t/07-oo_interactive.t     2017-04-26 02:15:48.000000000 
+0200
+++ new/IO-Pager-0.4/t/07-oo_interactive.t      2018-10-11 04:32:08.000000000 
+0200
@@ -10,16 +10,18 @@
   skip_interactive();
 
   require IO::Pager;
+  require IO::Pager::Buffered;
   {
-    my $BOB = new IO::Pager undef, 'Buffered' or die "Failed to create PAGER 
FH $!";
+#   my $BOB = new IO::Pager::Buffered or die "Failed to create PAGER FH $!";
+    my $BOB = new IO::Pager local *STDOUT, 'Buffered' or die "Failed to create 
PAGER FH $!";
 
-    isa_ok $BOB, 'IO::Pager::Buffered'; #non-fully qualified sub-class test
-
-    $BOB->print("OO factory filehandle\n");
+    isa_ok $BOB, 'IO::Pager::Buffered';
+    
+    $BOB->print("OO factory filehandle\n") foreach 1..25;
     $BOB->print("\nEnd of text, try pressing 'Q' to exit.\n");
-    $BOB->close();
   }
 
+  select STDERR;
   my $A1 = prompt("\nDid you see 'OO factory filehandle' in your pager? [Yn]");
   ok is_yes($A1), 'OO, factory instantiation';
 
@@ -30,8 +32,8 @@
 
     isa_ok $BOB, 'IO::Pager::Unbuffered';
 
-    $BOB->say("OO subclass filehandle\n");
-    $BOB->say("\nEnd of text, try pressing 'Q' to exit.\n");
+    $BOB->say("OO subclass filehandle") foreach 1..25;
+    $BOB->say("\nEnd of text, try pressing 'Q' to exit.");
     #XXX Close required because pager is not terminated on DESTROY
     $BOB->close();
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/IO-Pager-0.39/t/10-close_interactive.t 
new/IO-Pager-0.4/t/10-close_interactive.t
--- old/IO-Pager-0.39/t/10-close_interactive.t  2017-04-26 02:16:03.000000000 
+0200
+++ new/IO-Pager-0.4/t/10-close_interactive.t   2018-10-11 04:42:34.000000000 
+0200
@@ -11,7 +11,7 @@
   my $A;
 
   PAUSE: {
-    my $token = new IO::Pager undef, 'Buffered';
+    my $token = new IO::Pager local *RIBBIT, 'Buffered';
     isa_ok $token, 'IO::Pager::Buffered';
 
     my $PID = $token->PID;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/IO-Pager-0.39/t/11-redirect-oo.pl 
new/IO-Pager-0.4/t/11-redirect-oo.pl
--- old/IO-Pager-0.39/t/11-redirect-oo.pl       2013-04-07 00:01:14.000000000 
+0200
+++ new/IO-Pager-0.4/t/11-redirect-oo.pl        2018-10-08 14:42:49.000000000 
+0200
@@ -1,7 +1,7 @@
 use blib;
 use IO::Pager;
 
-our $txt; require 't/08-redirect.pl';
+our $txt; require './t/08-redirect.pl';
 
 my $FH = new IO::Pager;
 $FH->print($txt);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/IO-Pager-0.39/t/14-tee_interactive.t 
new/IO-Pager-0.4/t/14-tee_interactive.t
--- old/IO-Pager-0.39/t/14-tee_interactive.t    1970-01-01 01:00:00.000000000 
+0100
+++ new/IO-Pager-0.4/t/14-tee_interactive.t     2018-10-08 21:13:26.000000000 
+0200
@@ -0,0 +1,41 @@
+use strict;
+use warnings;
+use Test::More 0.88;
+require './t/TestUtils.pm';
+t::TestUtils->import();
+
+use bignum;
+use IO::Pager;
+
+
+SKIP: {
+  skip_interactive();
+
+  local $STDOUT = new IO::Pager *STDOUT;
+  eval{ require PerlIO::Util };
+  skip("Could not load PerlIO::Tee") if $@;
+
+  binmode(*STDOUT, ":tee($$.log)");
+  #Equivalent to
+  #$STDOUT->binmode(":tee($$.log)");
+
+  $a=2308; $b=4261;
+  print my $LOG ="Exit your pager after a bit\n";
+  eval{
+    $LOG .= "$a\n";
+    print $a, "\n";
+
+    #Brady numbers also the golden ratio
+    ($a,$b)=($b,$a+$b);
+
+    select(undef, undef, undef, 0.15);
+  } until( eof(*STDOUT));  
+  print "Pager closed, checking log.\n";
+  open(LOG, "$$.log") or die "Missing $$.log: $!";
+  my $TEE = join('', <LOG>);
+  cmp_ok($LOG, 'eq', $TEE, 'PerlIO::tee test passed');
+}
+
+done_testing;
+
+END{ unlink("$$.log") }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/IO-Pager-0.39/t/15-log_interactive.t 
new/IO-Pager-0.4/t/15-log_interactive.t
--- old/IO-Pager-0.39/t/15-log_interactive.t    1970-01-01 01:00:00.000000000 
+0100
+++ new/IO-Pager-0.4/t/15-log_interactive.t     2018-10-08 21:49:08.000000000 
+0200
@@ -0,0 +1,39 @@
+use strict;
+use warnings;
+use Test::More 0.88;
+require './t/TestUtils.pm';
+t::TestUtils->import();
+
+use bignum;
+use IO::Pager;
+
+
+SKIP: {
+  skip_interactive();
+
+  local $STDOUT = new IO::Pager *STDOUT;
+  eval{ require PerlIO::Util };
+  skip("Could not load PerlIO::Tee") if $@;
+
+  binmode(*STDOUT, ":LOG()");
+
+  $a=2308; $b=4261;
+  print my $LOG ="Exit your pager after a bit\n";
+  eval{
+    $LOG .= "$a\n";
+    print $a, "\n";
+
+    #Brady numbers also the golden ratio
+    ($a,$b)=($b,$a+$b);
+
+    select(undef, undef, undef, 0.15);
+  } until( eof(*STDOUT));
+  print "Pager closed, checking log.\n";
+  open(LOG, "$$.log") or die "Missing $$.log: $!";
+  my $TEE = join('', <LOG>);
+  cmp_ok($LOG, 'eq', $TEE, ':LOG pseudo-layer');
+}
+
+done_testing;
+
+END{ unlink("$$.log") }


Reply via email to