> Incidentally, can anyone tell me why I have to do: > > my $fh = $self->output_fh (); > my $oldfh = select $fh; > my $oldflush = $|; > $| = 1; > print $fh ''; > $| = $oldflush; > select $oldfh; > > instead of the obvious: > > my $fh = $self->output_fh (); > $fh->flush (); > > which the IO::Handle documentation seems to indicate is supposed to work? > If I do the latter, I just get "Can't locate object method "flush" via > package "IO::Handle" at ../blib/lib/Pod/Text.pm line 594." This is with > Perl 5.8.7.
Because perl automatically pseudo-blesses filehandles into either FileHandle or IO::Handle, but doesn't actually load the modules. Note that if you do "use IO::Handle", you will no longer work in miniperl; I don't know if the pod stuff is used via miniperl anywhere.
