Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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

Hi,

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
McA

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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1021036]
help
Chatterbox?
[davido]: The code seems pretty sane, and relatively foolproof. I guess I can answer my own question; move() should work across filesystems so long as they're mounted, rw, and not filled up.

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2016-12-10 03:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (159 votes). Check out past polls.