%define upstream_name utf8-all %define upstream_version 0.007 Name: perl-%{upstream_name} Version: %perl_convert_version %{upstream_version} Release: %mkrel 2 Summary: Turn on Unicode - all of it License: GPL+ or Artistic Group: Development/Perl Url: http://search.cpan.org/dist/%{upstream_name} Source0: http://www.cpan.org/modules/by-module/utf8/%{upstream_name}-%{upstream_version}.tar.gz BuildRequires: perl(Dist::CheckConflicts) BuildRequires: perl(Encode) BuildRequires: perl(File::Find) BuildRequires: perl(File::Temp) BuildRequires: perl(Import::Into) BuildRequires: perl(Module::Build) BuildRequires: perl(PerlIO) BuildRequires: perl(Test::More) BuildRequires: perl(Test::Warn) BuildRequires: perl(autodie) BuildRequires: perl(charnames) BuildRequires: perl(open) BuildRequires: perl(parent) BuildRequires: perl(strict) BuildRequires: perl(utf8) BuildRequires: perl(version) BuildRequires: perl(warnings) BuildArch: noarch %description the utf8 manpage allows you to write your Perl encoded in UTF-8. That means UTF-8 strings, variable names, and regular expressions. 'utf8::all' goes further, and makes '@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 '\N{...}' sequences can be used to compile Unicode characters based on names. If you _don't_ want UTF-8 for a particular filehandle, you'll have to set 'binmode $filehandle'. 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! %prep %setup -q -n %{upstream_name}-%{upstream_version} %build %{__perl} Makefile.PL INSTALLDIRS=vendor %make %check %make test %install %makeinstall_std %files %doc META.json META.yml LICENSE Changes README %{_mandir}/man3/* %perl_vendorlib/* %changelog * Sun Jan 13 2013 umeabot <umeabot> 0.7.0-2.mga3 + Revision: 375587 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Thu Aug 16 2012 shlomif <shlomif> 0.7.0-1.mga3 + Revision: 281514 - imported package perl-utf8-all