Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: App::Cmd::Command and abstract encoding

by tobyink (Abbot)
on Feb 28, 2013 at 09:25 UTC ( #1021028=note: print w/ replies, xml ) Need Help??


in reply to App::Cmd::Command and abstract encoding

One would hope that...

use utf8;

... would be sufficient, as that's how you tell Perl that some code is in UTF-8. It doesn't look like App::Cmd::Command pays heed to this though (see the abstract method defined therein).

I'd argue that this is a bug.

Personally I'd just do:

use utf8; use constant abstract => q(go to the café);
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name


Comment on Re: App::Cmd::Command and abstract encoding
Select or Download Code
Re^2: App::Cmd::Command and abstract encoding
by McA (Curate) on Feb 28, 2013 at 09:43 UTC

    Hi tobyink,

    thank you for the fast answer. Before checking whether someone answered here I had a look at the source code, too. So I had to smile reading your comment.

    I'm pretty sure it should be easy to react on a pattern

    /^=encoding\s+[uU][tT][fF]-?8/
    while in status $inpod.

    It seems to be a little harder to parse for a use utf8;-like statement.

    What do you think about scanning for =encoding ?

    Best regards
    McA

    P.S.: I forgot something: I work with App::Cmd in combination with dzil and dzil generates the pod entries for me.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1021028]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2014-09-15 10:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (146 votes), past polls