< and > don't work with use warnings FATAL => 'all'; #6

Closed
drrk opened this Issue Oct 14, 2011 · 2 comments

Comments

Projects
None yet
2 participants

drrk commented Oct 14, 2011

When warnings are upgraded to fatal the overloaded redirection operators do not work, the 'Useless use of numeric < in void context' or similar is raised.

I suspect the handler override needs to be different in this case.

Collaborator

shlomif commented Oct 23, 2014

@drrk: can you provide a reproducing test case for that? This script seems to run fine:

#!/usr/bin/perl

use strict;
use warnings FATAL => 'all';

use IO::All;

use File::Temp qw/ tempfile tempdir /;

my $dir = tempdir( CLEANUP => 1 );

my $fn = "$dir/foo.txt";
io->file($fn)->print("One\nTwo\nThree\n");

my $fh = io->file($fn);

$fh->tie;
while (my $l = <$fh>)
{
    print "$l\n";
}

drrk commented Oct 23, 2014

No idea, I raised this issue 3 years ago. I don't even recall what this project is.

@drrk drrk closed this Oct 23, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment