And the problem is, 5.10 has different flags than 5.12. I dont know yet if 5.10 has different C consts, or just different api design, and if the 16XXX/0x4000 flag is plain wrong. I havent looked if 0x4000 is hard coded in Layers the module or not.sub _has_flags { my $check_flag = _names_to_flags(@_); return sub { my ($fh, $layer) = @_; my $iterator = natatime(3, PerlIO::get_layers($fh, details => +1)); while (my ($name, $arguments, $flags) = $iterator->()) { next if defined $layer and $name ne $layer; print('FL='.unpack('H8',pack('N',$flags)).','.unpack('B32' +,pack('N',$flags))."\n"); print('CK='.unpack('H8',pack('N',$check_flag)).','.unpack( +'B32',pack('N',$check_flag))."\n"); my $entry = $flags & $check_flag; return 1 if $entry; } return 0; } }
On 5.12$VAR1 = { "\$mode" => "<:encoding(utf8)", "\$fh" => \*{"main::\$fh"}, "\$test_type" => "crlf", "\$result_for{\$test_type}" => 1 }; FL=00408400,00000000010000001000010000000000 CK=00004000,00000000000000000100000000000000 FL=00408400,00000000010000001000010000000000 CK=00004000,00000000000000000100000000000000 FL=00408400,00000000010000001000010000000000 CK=00004000,00000000000000000100000000000000 not ok 51 - File opened with <:encoding(utf8) should return 1 on test +crlf # Failed test 'File opened with <:encoding(utf8) should return 1 on +test crlf' # at 10-basics.t line 77. # got: '0' # expected: '1' # $VAR1 = [ # "unix", # undef, # [ # "UTF8", # "CANREAD", # "FASTGETS" # ] # ]; # $VAR2 = [ # "crlf", # undef, # [ # "UTF8", # "CANREAD", # "FASTGETS" # ] # ]; # $VAR3 = [ # "encoding", # "utf8", # [ # "UTF8", # "CANREAD", # "FASTGETS" # ] # ];
I will keep looking.$VAR1 = { "\$fh" => \*{"main::\$fh"}, "\$mode" => "<:encoding(utf8)", "\$result_for{\$test_type}" => 1, "\$test_type" => "crlf" }; FL=00200400,00000000001000000000010000000000 CK=00004000,00000000000000000100000000000000 FL=00404400,00000000010000000100010000000000 CK=00004000,00000000000000000100000000000000
In reply to Re^3: [Win32] PerlIO-Layers fails 4 tests on perl-5.10 only
by bulk88
in thread [Win32] PerlIO-Layers fails 4 tests on perl-5.10 only
by syphilis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |