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

Replies are listed 'Best First'.
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

    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

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