utf8-all-0.011/ 0000775 0001750 0001750 00000000000 12177207705 011615 5 ustar mike mike utf8-all-0.011/xt/ 0000775 0001750 0001750 00000000000 12177207705 012250 5 ustar mike mike utf8-all-0.011/xt/release/ 0000775 0001750 0001750 00000000000 12177207705 013670 5 ustar mike mike utf8-all-0.011/xt/release/minimum-version.t 0000644 0001750 0001750 00000000267 12177207705 017216 0 ustar mike mike #!perl
use Test::More;
eval "use Test::MinimumVersion";
plan skip_all => "Test::MinimumVersion required for testing minimum versions"
if $@;
all_minimum_version_ok( qq{5.10.1} );
utf8-all-0.011/xt/release/pod-linkcheck.t 0000644 0001750 0001750 00000000537 12177207705 016573 0 ustar mike mike #!perl
use strict;
use warnings;
use Test::More;
foreach my $env_skip ( qw(
SKIP_POD_LINKCHECK
) ){
plan skip_all => "\$ENV{$env_skip} is set, skipping"
if $ENV{$env_skip};
}
eval "use Test::Pod::LinkCheck";
if ( $@ ) {
plan skip_all => 'Test::Pod::LinkCheck required for testing POD';
}
else {
Test::Pod::LinkCheck->new->all_pod_ok;
}
utf8-all-0.011/xt/release/dist-manifest.t 0000644 0001750 0001750 00000000230 12177207705 016615 0 ustar mike mike #!perl
use Test::More;
eval "use Test::DistManifest";
plan skip_all => "Test::DistManifest required for testing the manifest"
if $@;
manifest_ok();
utf8-all-0.011/xt/release/cpan-changes.t 0000644 0001750 0001750 00000000263 12177207705 016403 0 ustar mike mike #!perl
use strict;
use warnings;
use Test::More 0.96 tests => 2;
use_ok('Test::CPAN::Changes');
subtest 'changes_ok' => sub {
changes_file_ok('Changes');
};
done_testing();
utf8-all-0.011/xt/release/pod-coverage.t 0000644 0001750 0001750 00000000527 12177207705 016432 0 ustar mike mike #!perl
use Test::More;
eval "use Test::Pod::Coverage 1.08";
plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage"
if $@;
eval "use Pod::Coverage::TrustPod";
plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage"
if $@;
all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' });
utf8-all-0.011/xt/release/test-version.t 0000644 0001750 0001750 00000000643 12177207705 016520 0 ustar mike mike use strict;
use warnings;
use Test::More;
# generated by Dist::Zilla::Plugin::Test::Version 0.002004
BEGIN { eval "use Test::Version; 1;" or die $@; }
my @imports = ( 'version_all_ok' );
my $params = {
is_strict => 0,
has_version => 0,
};
push @imports, $params
if version->parse( $Test::Version::VERSION ) >= version->parse('1.002');
Test::Version->import(@imports);
version_all_ok;
done_testing;
utf8-all-0.011/xt/release/unused-vars.t 0000644 0001750 0001750 00000000207 12177207705 016326 0 ustar mike mike #!perl
use Test::More;
eval "use Test::Vars";
plan skip_all => "Test::Vars required for testing unused vars"
if $@;
all_vars_ok();
utf8-all-0.011/xt/release/pod-syntax.t 0000644 0001750 0001750 00000000212 12177207705 016154 0 ustar mike mike #!perl
use Test::More;
eval "use Test::Pod 1.41";
plan skip_all => "Test::Pod 1.41 required for testing POD" if $@;
all_pod_files_ok();
utf8-all-0.011/xt/release/meta-json.t 0000644 0001750 0001750 00000000233 12177207705 015746 0 ustar mike mike #!perl
use Test::More;
eval 'use Test::CPAN::Meta::JSON';
plan skip_all => 'Test::CPAN::Meta::JSON required for testing META.json' if $@;
meta_json_ok();
utf8-all-0.011/xt/release/distmeta.t 0000644 0001750 0001750 00000000217 12177207705 015665 0 ustar mike mike #!perl
use Test::More;
eval "use Test::CPAN::Meta";
plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@;
meta_yaml_ok();
utf8-all-0.011/xt/release/kwalitee.t 0000644 0001750 0001750 00000000361 12177207705 015660 0 ustar mike mike #!perl
# This test is generated by Dist::Zilla::Plugin::Test::Kwalitee
use strict;
use warnings;
use Test::More; # needed to provide plan.
eval "use Test::Kwalitee";
plan skip_all => "Test::Kwalitee required for testing kwalitee" if $@;
utf8-all-0.011/xt/release/mojibake.t 0000644 0001750 0001750 00000000406 12177207705 015634 0 ustar mike mike #!perl
use strict;
use warnings qw(all);
use Test::More;
## no critic (ProhibitStringyEval, RequireCheckingReturnValueOfEval)
eval q(use Test::Mojibake);
plan skip_all => q(Test::Mojibake required for source encoding testing) if $@;
all_files_encoding_ok();
utf8-all-0.011/xt/release/synopsis.t 0000644 0001750 0001750 00000000220 12177207705 015734 0 ustar mike mike #!perl
use Test::More;
eval "use Test::Synopsis";
plan skip_all => "Test::Synopsis required for testing synopses"
if $@;
all_synopsis_ok();
utf8-all-0.011/xt/release/no-tabs.t 0000644 0001750 0001750 00000000212 12177207705 015411 0 ustar mike mike use strict;
use warnings;
use Test::More;
eval 'use Test::NoTabs';
plan skip_all => 'Test::NoTabs required' if $@;
all_perl_files_ok();
utf8-all-0.011/xt/author/ 0000775 0001750 0001750 00000000000 12177207705 013552 5 ustar mike mike utf8-all-0.011/xt/author/test-eol.t 0000644 0001750 0001750 00000000364 12177207705 015474 0 ustar mike mike use strict;
use warnings;
use Test::More;
# generated by Dist::Zilla::Plugin::Test::EOL 0.07
eval "use Test::EOL; 1;" or die $@;
# ^^ hack to get around prereqscanner detection, remove someday
all_perl_files_ok({ trailing_whitespace => 1 });
utf8-all-0.011/xt/author/critic.t 0000644 0001750 0001750 00000000435 12177207705 015214 0 ustar mike mike #!perl
use strict;
use warnings;
use Test::More;
use English qw(-no_match_vars);
eval "use Test::Perl::Critic";
plan skip_all => 'Test::Perl::Critic required to criticise code' if $@;
Test::Perl::Critic->import( -profile => "perlcritic.rc" ) if -e "perlcritic.rc";
all_critic_ok();
utf8-all-0.011/lib/ 0000775 0001750 0001750 00000000000 12177207705 012363 5 ustar mike mike utf8-all-0.011/lib/utf8/ 0000775 0001750 0001750 00000000000 12177207705 013251 5 ustar mike mike utf8-all-0.011/lib/utf8/all/ 0000775 0001750 0001750 00000000000 12177207705 014021 5 ustar mike mike utf8-all-0.011/lib/utf8/all/Conflicts.pm 0000644 0001750 0001750 00000002564 12177207705 016310 0 ustar mike mike package # hide from PAUSE
utf8::all::Conflicts;
use strict;
use warnings;
use Dist::CheckConflicts
-dist => 'utf8::all',
-conflicts => {
'autodie' => '2.11',
},
;
1;
# ABSTRACT: Provide information on conflicts for utf8::all
__END__
=pod
=encoding utf-8
=head1 NAME
utf8::all::Conflicts - Provide information on conflicts for utf8::all
=head1 VERSION
version 0.011
=head1 AVAILABILITY
The project homepage is L.
The latest version of this module is available from the Comprehensive Perl
Archive Network (CPAN). Visit L to find a CPAN
site near you, or see L.
=head1 SOURCE
The development version is on github at L
and may be cloned from L
=head1 BUGS AND LIMITATIONS
You can make new bug reports, and view existing ones, through the
web interface at L.
=head1 AUTHORS
=over 4
=item *
Michael Schwern
=item *
Mike Doherty
=back
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2009 by Michael Schwern .
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
utf8-all-0.011/lib/utf8/all.pm 0000644 0001750 0001750 00000010431 12177207705 014354 0 ustar mike mike package utf8::all;
use strict;
use warnings;
use 5.010; # state
# ABSTRACT: turn on Unicode - all of it
our $VERSION = '0.011'; # VERSION
use Import::Into;
use parent qw(Encode charnames utf8 open warnings feature);
use Symbol qw/qualify_to_ref/;
sub import {
my $target = caller;
'utf8'->import::into($target);
'open'->import::into($target, qw{:encoding(UTF-8) :std});
'charnames'->import::into($target, qw{:full :short});
'warnings'->import::into($target, qw{FATAL utf8});
'feature'->import::into($target, qw{unicode_strings}) if $^V >= v5.11.0;
'feature'->import::into($target, qw{unicode_eval fc}) if $^V >= v5.16.0;
{
no strict qw(refs); ## no critic (TestingAndDebugging::ProhibitNoStrict)
*{$target . '::readdir'} = \&_utf8_readdir;
}
# utf8 in @ARGV
state $have_encoded_argv = 0;
_encode_argv() unless $have_encoded_argv++;
$^H{'utf8::all'} = 1;
return;
}
sub _encode_argv {
$_ = Encode::decode('UTF-8', $_) for @ARGV;
return;
}
sub _utf8_readdir(*) { ## no critic (Subroutines::ProhibitSubroutinePrototypes)
my $pre_handle = shift;
my $handle = ref($pre_handle) ? $pre_handle : qualify_to_ref($pre_handle, caller);
my $hints = (caller 0)[10];
if (wantarray) {
my @all_files = CORE::readdir($handle);
return @all_files if not $hints->{'utf8::all'};
$_ = Encode::decode('UTF-8', $_) for @all_files;
return @all_files;
}
else {
my $next_file = CORE::readdir($handle);
$next_file = Encode::decode('UTF-8', $next_file) if $hints->{'utf8::all'};
return $next_file;
}
}
1;
__END__
=pod
=encoding utf-8
=head1 NAME
utf8::all - turn on Unicode - all of it
=head1 VERSION
version 0.011
=head1 SYNOPSIS
use utf8::all; # Turn on UTF-8. All of it.
open my $in, '<', 'contains-utf8'; # UTF-8 already turned on here
print length 'føø bār'; # 7 UTF-8 characters
my $utf8_arg = shift @ARGV; # @ARGV is UTF-8 too!
=head1 DESCRIPTION
L allows you to write your Perl encoded in UTF-8. That means UTF-8
strings, variable names, and regular expressions. C goes further, and
makes C<@ARGV> encoded in UTF-8, and filehandles are opened with UTF-8 encoding
turned on by default (including STDIN, STDOUT, STDERR), and charnames are
imported so C<\N{...}> sequences can be used to compile Unicode characters based
on names. If you I want UTF-8 for a particular filehandle, you'll have to
set C.
The pragma is lexically-scoped, so you can do the following if you had some
reason to:
{
use utf8::all;
open my $out, '>', 'outfile';
my $utf8_str = 'føø bār';
print length $utf8_str, "\n"; # 7
print $out $utf8_str; # out as utf8
}
open my $in, '<', 'outfile'; # in as raw
my $text = do { local $/; <$in>};
print length $text, "\n"; # 10, not 7!
=head1 INTERACTION WITH AUTODIE
If you use L, which is a great idea, you need to use at least version
B<2.12>, released on L.
Otherwise, autodie obliterates the IO layers set by the L pragma. See
L