Perl Diver 2.31
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

Test2::Plugin::UTF8

Name Test2::Plugin::UTF8
Version 0.000144
Located at /usr/local/share/perl5
File /usr/local/share/perl5/Test2/Plugin/UTF8.pm
Is Core No
Search CPAN for this module Test2::Plugin::UTF8
Documentation Test2::Plugin::UTF8
Module Details Test2::Plugin::UTF8


NAME

Test2::Plugin::UTF8 - Test2 plugin to test with utf8.


DESCRIPTION

When used, this plugin will make tests work with utf8. This includes turning on the utf8 pragma and updating the Test2 output formatter to use utf8.


SYNOPSIS

    use Test2::Plugin::UTF8;

This is similar to:

    use utf8;
    BEGIN {
        require Test2::Tools::Encoding;
        Test2::Tools::Encoding::set_encoding('utf8');
    }

You can also disable the utf8 import by using 'encoding_only' to only enable utf8 encoding on the output format.

    use Test2::Plugin::UTF8 qw(encoding_only);


import options

encoding_only

Does not import utf8 in your test and only enables the encoding mode on the output.


NOTES

This module currently sets output handles to have the ':utf8' output layer. Some might prefer ':encoding(utf-8)' which is more strict about verifying characters. There is a debate about whether or not encoding to utf8 from perl internals can ever fail, so it may not matter. This was also chosen because the alternative causes threads to segfault, see perlbug 31923.


SOURCE

The source code repository for Test2-Suite can be found at https://github.com/Test-More/Test2-Suite/.


MAINTAINERS

Chad Granum


AUTHORS

Chad Granum <exodist@cpan.org>Chad Granum


COPYRIGHT

Copyright 2018 Chad Granum <exodist@cpan.org>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://dev.perl.org/licenses/

Perl Diver brought to you by ScriptSolutions.com © 1997- 2024