Gentoo Archives: gentoo-user

From: Stefan Schulte <stefan.schulte@×××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Installation (or not) of Perl Getopt::Long
Date: Sat, 26 Dec 2009 12:09:53
Message-Id: 20091226114849.GA7147@nebukadnezar.matrix.de
In Reply to: [gentoo-user] Installation (or not) of Perl Getopt::Long by Stroller
1 Hi Stroller,
2
3 you may also want to look at Getopt::Declare. If you dont want to do
4 something fancy you just have to write the »program -help« page and
5 you're done.
6
7 It's not in portage but you can emerge g-cpan to install it.
8
9 Stefan
10
11 On Fri, Dec 25, 2009 at 04:21:53PM +0000, Stroller wrote:
12 > Hey, Gentoo,
13 >
14 > I'm just attempting to learn a little Perl and write a little Perl program.
15 >
16 > I have been experimenting with the Getopt::Long module, which seems to be working fine, but I'm considering Getopt::Tabular instead.
17 >
18 > So I thought I'd search portage for "Getopt", to see if that is readily provided by Portage, or otherwise which modules are:
19 >
20 > $ eix -c -C perl Getopt
21 > [N] dev-perl/Getopt-ArgvFile (1.11): This module is a simple supplement to other option handling modules.
22 > [N] dev-perl/Getopt-Long-Descriptive (~0.083): Getopt::Long with usage text
23 > [N] dev-perl/Getopt-Mixed (1.10): Getopt::Mixed is used for parsing mixed options
24 > [N] dev-perl/MooseX-Getopt (~0.26): A Moose role for processing command line options
25 > [N] perl-core/Getopt-Long (2.38): Advanced handling of command line options
26 > Found 5 matches.
27 > $
28 >
29 > Yet none of them, not even the Get::Long package that I've been experimenting with, are installed on my system:
30 >
31 > $ eix -c -C perl Getopt -I
32 > No matches found.
33 > $
34 >
35 > Can anyone explain, please, why this appears not to be installed? Yet how it's working just fine?
36 >
37 > It looks like a simpler options parsing module is installed, but not this one:
38 >
39 > $ locate GetOpt
40 > /usr/share/man/man3/Tcl_ChannelGetOptionProc.3.bz2
41 > /usr/share/doc/perl-5.8.8-r8/html/lib/Pod/Perldoc/GetOptsOO.html
42 > /usr/lib/perl5/5.8.8/Pod/Perldoc/GetOptsOO.pm
43 > $
44 >
45 > 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:
46 >
47 > $ grep -i Getopt `which get_iplayer`
48 > use Getopt::Long;
49 > search => [ 1, "search=s", 'Search', '--search <search term>', "GetOpt compliant way of specifying search args"],
50 > use Getopt::Long;
51 > # Build hash for passing to GetOptions module
52 > Getopt::Long::Configure("bundling");
53 > Getopt::Long::Configure("pass_through");
54 > Getopt::Long::Configure("no_pass_through");
55 > return GetOptions(%get_opts);
56 > $
57 >
58 > get_iplayer can be examined at http://linuxcentre.net/get_iplayer/get_iplayer in case I'm misunderstanding its usage.
59 >
60 > I feel really dumb - there must be something simple & logical that I'm missing here.
61 >
62 > Stroller.
63 >
64 >

Replies

Subject Author
Re: [gentoo-user] Installation (or not) of Perl Getopt::Long Stroller <stroller@××××××××××××××××××.uk>