Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 (Priest) 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 exploiting the Monastery: (8)
As of 2015-07-06 23:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (85 votes), past polls