in reply to Perl 5.12: layers and opening scalars as file handles

Difference between 5.12.2 and 5.14.1 if you set PERLIO_DEBUG=

$ perl -le " open my $fh => '<:raw', \'blah' "
-e:1 scalar => 0x12113000 -e:1 raw => 0x68b5c6c0 -e:1 Layer 1 is raw -e:1 openn(raw,':raw','r',-1,0,0,0,1,0x3f5230) -e:1 Layer 0 is unix -e:0 Destruct 0x3f3f7c ...
-e:1 scalar => 64fc3000 -e:1 raw => 66c53840 -e:1 Layer 1 is raw -e:1 openn(raw,':raw','r',-1,0,0,00000000,1,003f5230) -e:1 Layer 0 is unix -e:1 Layer 0 is scalar -e:1 PerlIO_push f=009941dc scalar r 0099a904 -e:1 PerlIO_push f=009941dc raw r 003f47a8 -e:1 :raw f=009941dc :scalar -e:0 PerlIO_pop f=009941dc scalar -e:0 Destruct 003f4004 ...

On the other hand, if you use

$ perl -le " open my $fh => '<:encoding(UTF-8)', \'blah' "
there is no difference aside from the usual memaddr
-e:1 encoding => 0x1076000 -e:1 Layer 1 is encoding -e:1 openn(encoding,':encoding(UTF-8)','r',-1,0,0,0,1,0x3f5208) -e:1 Layer 0 is unix -e:1 Layer 0 is scalar -e:1 PerlIO_push f=0x9b4024 scalar r 0x9ba20c -e:1 PerlIO_push f=0x9b4024 encoding r 0x9b9c4c -e:0 PerlIO_pop f=0x9b4024 encoding -e:0 PerlIO_pop f=0x9b4024 scalar -e:0 Destruct 0x3f3f5c