So the question remains, is it even possible to create, and install, a module designed for Perl 5.8.3 compatibility, that provides UTF8 functions, and that does not require any non-core modules--and do this with reasonable UTF8-based tests?
As I tried to make clear earlier, Test::More::UTF8 is just a helper, which effectively runs the single line of code
BEGIN { binmode Test::More->builder->$_, ':utf8' for qw/failure_output + todo_output output/; }

Here is an SSCCE which I ran in Strawberry Perl v5.8.8, so it should likely be compatible even with Perl v5.8.3 (which I don't have readily available for verification). It shows the wide-character warning if you run it with no command-line arguments, but will not warn if you give it a command line argument of "1" (or any other non-false value). It doesn't use any any non-core modules. All you have to do to make the same code work in general, without command line arguments, is to get rid of the if($ARGV[0]){} wrapper.

use 5.008;
use strict;
use warnings;
use Test::More tests => 1;
use utf8;
use open ':std', ':encoding(UTF-8)';
use Encode;

BEGIN {
    if($ARGV[0]) {
        binmode Test::More->builder->$_, ':utf8' for qw/failure_output todo_output output/;
    }
}

$| = 1;
my $smile = "☺";

diag "This smile $smile will ", ($ARGV[0]?'not ':''), "warn";

is $smile, Encode::decode('UTF-8', "\xE2\x98\xBA"), "equivalent smiles";
__END__

C:> chcp 65001
Active code page: 65001

C:> perl pm11156039_testmoreutf8.pl
1..1
Wide character in print at C:/usr/local/apps/berrybrew/perls/5.8.8_32/perl/lib/Test/Builder.pm line 1275.
# This smile ☺ will warn
ok 1 - equivalent smiles


C:> perl pm11156039_testmoreutf8.pl 1
1..1
# This smile ☺ will not warn
ok 1 - equivalent smiles

(used pre instead of code tags because of unicode characters)


In reply to Re: How to create and install a module compatible with both UTF8 and Perl 5.8.3 without using non-core modules? by pryrt
in thread How to create and install a module compatible with both UTF8 and Perl 5.8.3 without using non-core modules? by Polyglot

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.