Skip to content

Use of uninitialized value $this in <HANDLE> #17435

Open
@toddr

Description

@toddr

Transferred from RT - https://rt.cpan.org/Ticket/Display.html?id=125436

IO::File started throwing warnings on getline(), if there wasn't writing to file before.

$ perl5.18.2 -Mwarnings -MIO::File -e 'my $h; my $f=IO::File->new(\$h,"+>:"); $f->getline();'
$ 
$ perl5.24.3 -Mwarnings -MIO::File -e 'my $h; my $f=IO::File->new(\$h,"+>:"); $f->getline();'
Use of uninitialized value $this in <HANDLE> at -e line 1.
Use of uninitialized value $this in <HANDLE> at -e line 1.
Use of uninitialized value $this in <HANDLE> at -e line 1.
Use of uninitialized value $this in <HANDLE> at -e line 1.
Use of uninitialized value $this in <HANDLE> at -e line 1.
Use of uninitialized value $this in <HANDLE> at -e line 1.
Use of uninitialized value $this in <HANDLE> at -e line 1.
$ 
$ perl5.24.3 -Mwarnings -MIO::File -e 'my $h; my $f=IO::File->new(\$h,"+>:"); $f->write("a"); $f->getline();'
$

Commenting this line fixing the warning https://metacpan.org/source/TODDR/IO-1.39/lib/IO/Handle.pm#L435

Metadata

Metadata

Assignees

Labels

dist-IOissues in the dual-life blead-first IO distribution

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions