2011/4/6 Matt S Trout <m...@shadowcat.co.uk>:
> On Wed, Apr 06, 2011 at 04:29:18PM +0200, Perl Authors Upload Server wrote:
>>
>> The following module was proposed for inclusion in the Module List:
>>
>>   modid:       practical
>>   DSLIP:       bdppp
>>   description: practical - practical pragma
>>   userid:      PUNYTAN (プニプニ)
>>   chapterid:   27 (Pragma)
>>   communities:
>>     git://github.com/punytan/practical.git
>>
>>   similar:
>>     Modern::Perl, common::sense
>>
>>   rationale:
>>
>>     SYNOPSIS use practical;
>>
>>     # is the same as:
>>
>>     use strict; use warnings; use utf8; use feature qw(switch say
>>     state);
>>
>>     DESCRIPTION "practical" is practical pragma.
>>
>>     This module is written for people who are tired of typing hackneyed
>>     expressions. Many people write following code on the top of scripts.
>>
>>     use strict; use warnings; use utf8; use feature qw(switch say
>>     state);
>>
>>     Assuming that it is true, what we should do about it is shorten it.
>
> Wouldn't it be simpler to convince chromatic to add 'use utf8' to
> Modern::Perl ?
>
> --
> Matt S Trout - Shadowcat Systems - Perl consulting with a commit bit and a 
> clue
>
> http://shadowcat.co.uk/blog/matt-s-trout/   http://twitter.com/shadowcat_mst/
>
> Email me now on mst (at) shadowcat.co.uk and let's chat about how our Catalyst
> commercial support, training and consultancy packages could help your team.
>

Thank you for your suggestion.

It seems adding `use utf8;` to Modern::Perl may break backward compatibility.

Following code works fine in Modern::Perl 1.03

  use Modern::Perl;
  my $foo = 'いろは';
  say $foo;

But, if you add use utf8 (like your suggestion), you need to encode()
string before say().

  use Modern::Perl;
  use utf8;
  my $foo = 'いろは';
  say $foo; # Wide character warnings

In addition, Modern::Perl's doc says "In the future, it will include
additional CPAN modules which have proven useful and stable." In
contrast, I plan to freeze up this pragma.

-- 
punytan <puny...@gmail.com>

Reply via email to