Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

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

by McA (Priest)
on Feb 28, 2013 at 10:19 UTC ( #1021036=note: print w/replies, xml ) Need Help??

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


based on what I found in the source code and that I use a base class derived from App::Cmd::Command for all my commands I decided (constrained by time at the moment) to use the following solution:

I wrote the following method in my Commands base class:

sub abstract { my $self = shift; return decode('UTF-8', $self->SUPER::abstract(@_)); }

Don't forget use Encode qw(decode);.

Happy programming

P.S.: Have I ever mentioned that I hate the whole encoding stuff... ;-)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1021036]
[GrandFather]: Still, at least some of the images are good enough to get reasonable astrometry. Well, good enough for a good plate solve anyway
[Cow1337killr]: Hello, jedikaiti
[jedikaiti]: Cool!

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2017-02-20 20:56 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (302 votes). Check out past polls.