Pod::UsageTrans3pm
Print a usage message from embedded pod documentation
Usage
use Pod::UsageTransuse Locale::gettext;setlocale(LC_MESSAGES,'');textdomain('prog');my $message_text = "This text precedes the usage message.";my $exit_status = 2; ## The exit status to usemy $verbose_level = 0; ## The verbose level to usemy $filehandle = \*STDERR; ## The filehandle to write tomy $textdomain = 'prog-pod'; ## The gettext domain for the Pod documentationpod2usage($message_text);pod2usage($exit_status);pod2usage( { -message => gettext( $message_text ) ,-exitval => $exit_status ,-verbose => $verbose_level,-output => $filehandle,-textdomain => $textdomain } );pod2usage( -msg => $message_text ,-exitval => $exit_status ,-verbose => $verbose_level,-output => $filehandle,-textdomain => $textdomain );
Overview
Pod::UsageTrans works exactly like Pod::Usage but allows you to easily translate your messages. It was specifically written to be compatible with the .po files produced by po4a(7). If you want to use any other method to produce your .po files you should probably take a look at the source of code of this module to see which msgids you will need to use.
For documentation on calling pod2usage from your program see Pod::Usage. Pod::UsageTrans additionally supports a "-textdomain" option where you can specify the gettext domain to use. If "-textdomain" isn't set, Pod::UsageTrans will behave exactly like Pod::Usage.
Releases
6 releases since Debian 5.0 (Lenny); the text changed 5 times.