3 ms·
I was going to say that you need to use the IO::Handle module to be able to use the autoflush method, but apparently this no longer necessary with modern Perl.
by jwilk 7y ago
I was going to say that you need to use the IO::Handle module to be able to use the autoflush method, but apparently this no longer necessary with modern Perl.
From https://metacpan.org/pod/perl5120delta#Other-potentially-incompatible-changes https://metacpan.org/pod/perl5120delta#Other-potentially-inc... :
> Filehandles are now always blessed into IO::File.
> The previous behaviour was to bless Filehandles into FileHandle (an empty proxy class) if it was loaded into memory and otherwise to bless them into IO::Handle.
- jwilk 7y agoOn a second thought, this is probably the right changelog entry: https://metacpan.org/pod/perl5140delta#Filehandle-method-calls-load-IO::File-on-demand https://metacpan.org/pod/perl5140delta#Filehandle-method-cal... When a method call on a filehandle would die because the method cannot be resolved and IO::File has not been loaded, Perl now loads IO::File via require and attempts method resolution again