develooper Front page | perl.perl5.porters | Postings from May 2018

[perl #130021] Wrong context determined for <>/IO::Handle::getlinein debug mode

KES via RT
May 15, 2018 12:00
[perl #130021] Wrong context determined for <>/IO::Handle::getlinein debug mode
Message ID:
I minify testcase. This is occur only when I do call to Time::HiRes::gettimeofday

$ cat Devel/
package DB;

sub DB {

use Time::HiRes qw/ gettimeofday /;
sub sub {
	print "$DB::sub is called\n";
	# my $t =  [ gettimeofday ]; # <<< Uncomment this to get error

	return &$DB::sub;


$ cat
use IO::Handle();

$ perl -d:DB
strict::unimport is called
strict::bits is called
IO::Handle::_create_getline_subs is called
String found where operator expected at (eval 4)[Devel/] line 2, near "croak 'usage: $io->getline()'"
	(Do you need to predeclare croak?)
syntax error at (eval 4)[Devel/] line 2, near "croak 'usage: $io->getline()'"
Compilation failed in require at line 1.
BEGIN failed--compilation aborted at line 1.

via perlbug:  queue: perl5 status: open Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About