This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make :utf8 and :bytes MULTIARG
authorLeon Timmermans <fawaka@gmail.com>
Thu, 7 Apr 2011 10:33:21 +0000 (12:33 +0200)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 7 Apr 2011 14:56:09 +0000 (07:56 -0700)
commita778d1f5c1a446254887ec8addb0044ba74ea05a
tree5512cd635de53bbd502def8c19b36ec13fcd250d
parent4c34a6936037142444c003aac9d374ea84e5a195
Make :utf8 and :bytes MULTIARG

PerlIO layer types have this property that flags if they can accept
multiple arguments or only one. Unfortunately, this always checks the
uppermost layer that has an Open method defined. This causes issues when
used with utf8 or bytes on top of a layer that uses multiple arguments.

For 5.15 I think abolishing this feature may make most sense. It's just
flat out wrong IMO, it's the layer that uses the arguments that should
validate them, not the topmost, which may not even touch them. In the
mean time adding the multiargs flag to :utf8 and :bytes is a reasonable
stop-gap.

This patch makes perl slightly more permissive, so it shouldn't break
any working code out there.
perlio.c