-
Notifications
You must be signed in to change notification settings - Fork 561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inconsistency between PerlIO::get_layers and open/binmode #7896
Comments
From laurent.dami@justice.ge.chuse PerlIO;
open F, "foo.pl";
# now try to open a temp file with same layers as F
my $tmp = undef;
my $F_layers = join "", map {":$_"} PerlIO::get_layers(F);
open $tmp, "+>$F_layers", undef;
my $tmp_layers = join "", map {":$_"} PerlIO::get_layers($tmp);
print "MISMATCH !! $F_layers / $tmp_layers\n" unless $F_layers eq
$tmp_layers;
# on Win32 : MISMATCH !! :unix:crlf / :unix:crlf:unix
__END__
Perl Info
|
From @rgsI'm not sure that's really a bug, since open pushes some layers by |
The RT System itself - Status changed from 'new' to 'open' |
From Peter.Dintelmann@dresdner-bank.com":unix:crlf" seem to be the default layers on this platform. When $tmp is opened open $tmp, "+>$F_layers", undef; ":unix:crlf" ($F_layers) are pushed on top of the default layers resulting in ":unix:crlf:unix:crlf" for $tmp. However ":crlf" is documented to be pushed only once
IMHO your code behaves exactly as documented. |
From nick@ing-simmons.netBut the odd thing is if undef is replaced by a file name it works |
On UNIX my output is currently this on 5.30
@Leont can you comment on this? |
This is a known issue, though I'm not sure if it has a ticket. Our tempfile implementation is buggy with regards to layers, it applies them twice. |
Migrated from rt.perl.org#35180 (status was 'open')
Searchable as RT35180$
The text was updated successfully, but these errors were encountered: