- SEE ALSO
- COPYRIGHT AND LICENCE
- DISCLAIMER OF WARRANTIES
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.
Strings where either
utf8::is_utf8()is true, or each byte is below
Coercion to encode a character string to a byte string using
Encode::encode(). 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 <email@example.com>.
This software is copyright (c) 2013-2014, 2019 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.