Types::Encodings - type constraints for Bytes and Chars
Additional type constraints and coercions to complement Types::Standard.
Alias for Types::Standard type constraint of the same name.
utf8::is_utf8() is false.
Strings where either
utf8::is_utf8() is true,
or each byte is below
Coercion to encode a character string to a byte string using
This is a parameterized type coercion,
which expects a character set:
use Types::Standard qw( Bytes Encode ); has filename => ( is => "ro", isa => Bytes->plus_coercions( Encode["utf-8"] ), coerce => 1, );
Coercion to decode a byte string to a character string using
Encode::decode(). This is a parameterized type coercion, which expects a character set.
Please report any bugs to http://rt.cpan.org/Dist/Display.html?Queue=Types-Encodings.
Toby Inkster <firstname.lastname@example.org>.
This software is copyright (c) 2013-2014 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.