Hi Stroller,

you may also want to look at Getopt::Declare. If you dont want to do
something fancy you just have to write the »program -help« page and
you're done.

It's not in portage but you can emerge g-cpan to install it.

Stefan

On Fri, Dec 25, 2009 at 04:21:53PM +0000, Stroller wrote:
> Hey, Gentoo,
> 
> I'm just attempting to learn a little Perl and write a little Perl program.
> 
> I have been experimenting with the Getopt::Long module, which seems to be 
> working fine, but I'm considering Getopt::Tabular instead.
> 
> So I thought I'd search portage for "Getopt", to see if that is readily 
> provided by Portage, or otherwise which modules are:
> 
> $ eix -c -C perl Getopt 
> [N] dev-perl/Getopt-ArgvFile (1.11): This module is a simple supplement to 
> other option handling modules.
> [N] dev-perl/Getopt-Long-Descriptive (~0.083): Getopt::Long with usage text
> [N] dev-perl/Getopt-Mixed (1.10): Getopt::Mixed is used for parsing mixed 
> options
> [N] dev-perl/MooseX-Getopt (~0.26): A Moose role for processing command line 
> options
> [N] perl-core/Getopt-Long (2.38): Advanced handling of command line options
> Found 5 matches.
> $ 
> 
> Yet none of them, not even the Get::Long package that I've been experimenting 
> with, are installed on my system:
> 
> $ eix -c -C perl Getopt -I
> No matches found.
> $ 
> 
> Can anyone explain, please, why this appears not to be installed? Yet how 
> it's working just fine?
> 
> It looks like a simpler options parsing module is installed, but not this one:
> 
> $ locate GetOpt
> /usr/share/man/man3/Tcl_ChannelGetOptionProc.3.bz2
> /usr/share/doc/perl-5.8.8-r8/html/lib/Pod/Perldoc/GetOptsOO.html
> /usr/lib/perl5/5.8.8/Pod/Perldoc/GetOptsOO.pm
> $ 
> 
> Further evidence that Getopt::Long seems to be working on this system is that 
> it's used by get_iplayer, which has been working well on this system for the 
> last 3 weeks or so:
> 
> $ grep -i Getopt  `which get_iplayer`
> use Getopt::Long;
>         search          => [ 1, "search=s", 'Search', '--search <search 
> term>', "GetOpt compliant way of specifying search args"],
> use Getopt::Long;
>         # Build hash for passing to GetOptions module
>         Getopt::Long::Configure("bundling");
>                 Getopt::Long::Configure("pass_through");
>                 Getopt::Long::Configure("no_pass_through");
>         return GetOptions(%get_opts);
> $ 
> 
> get_iplayer can be examined at http://linuxcentre.net/get_iplayer/get_iplayer 
> in case I'm misunderstanding its usage.
> 
> I feel really dumb - there must be something simple & logical that I'm 
> missing here.
> 
> Stroller.
> 
> 

Attachment: pgpfStQycTknh.pgp
Description: PGP signature

Reply via email to