At 6:51 PM +0100 5/19/02, Nick Ing-Simmons wrote:
> >So whatever is bolloxed up is clearly not just a problem for euc-kr.
>>It appears that dump2file works ok when autoflush is on, but has
>>major problems when it's turned off.
>
>Which is very peculiar. dump2file does open, binmode, one print and close.
>As there is only one print, and that is immediately followed by a close
>autoflush should make little difference.
Sorry, red herring. Line 117 is not dump2file but actually the
globbed read in this section of code:
if (perlio_ok($e) or $DEBUG){
$dtext = '';
open $fh, "<:encoding($e)", $pfile or die "$pfile : $!";
while(defined(my $l = <$fh>)) {
$dtext .= $l;
}
close $fh;
}
The fact that the last time it keeps reading until it runs out of
memory suggests that it doesn't see end of file for some reason.
Just a wild guess, but we have this wacky definition of ungetc() in
iperlsys.h that could be in some way related to the problem:
#if defined(VMS) && defined(__DECC)
/* Unusual definition of ungetc() here to accomodate fast_sv_gets()'
* belief that it can mix getc/ungetc with reads from stdio buffer */
int decc$ungetc(int __c, FILE *__stream);
# define PerlSIO_ungetc(c,f) ((c) == EOF ? EOF : \
((*(f) && !((*(f))->_flag & _IONBF) && \
((*(f))->_ptr > (*(f))->_base)) ? \
((*(f))->_cnt++, *(--(*(f))->_ptr) = (c)) : decc$ungetc(c,f)))
#else
# define PerlSIO_ungetc(c,f) ungetc(c,f)
#endif
--
____________________________________________
Craig A. Berry
mailto:[EMAIL PROTECTED]
"Literary critics usually know what they're
talking about. Even if they're wrong."
-- Perl creator Larry Wall