1 |
Hey, Gentoo, |
2 |
|
3 |
I'm just attempting to learn a little Perl and write a little Perl program. |
4 |
|
5 |
I have been experimenting with the Getopt::Long module, which seems to be working fine, but I'm considering Getopt::Tabular instead. |
6 |
|
7 |
So I thought I'd search portage for "Getopt", to see if that is readily provided by Portage, or otherwise which modules are: |
8 |
|
9 |
$ eix -c -C perl Getopt |
10 |
[N] dev-perl/Getopt-ArgvFile (1.11): This module is a simple supplement to other option handling modules. |
11 |
[N] dev-perl/Getopt-Long-Descriptive (~0.083): Getopt::Long with usage text |
12 |
[N] dev-perl/Getopt-Mixed (1.10): Getopt::Mixed is used for parsing mixed options |
13 |
[N] dev-perl/MooseX-Getopt (~0.26): A Moose role for processing command line options |
14 |
[N] perl-core/Getopt-Long (2.38): Advanced handling of command line options |
15 |
Found 5 matches. |
16 |
$ |
17 |
|
18 |
Yet none of them, not even the Get::Long package that I've been experimenting with, are installed on my system: |
19 |
|
20 |
$ eix -c -C perl Getopt -I |
21 |
No matches found. |
22 |
$ |
23 |
|
24 |
Can anyone explain, please, why this appears not to be installed? Yet how it's working just fine? |
25 |
|
26 |
It looks like a simpler options parsing module is installed, but not this one: |
27 |
|
28 |
$ locate GetOpt |
29 |
/usr/share/man/man3/Tcl_ChannelGetOptionProc.3.bz2 |
30 |
/usr/share/doc/perl-5.8.8-r8/html/lib/Pod/Perldoc/GetOptsOO.html |
31 |
/usr/lib/perl5/5.8.8/Pod/Perldoc/GetOptsOO.pm |
32 |
$ |
33 |
|
34 |
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: |
35 |
|
36 |
$ grep -i Getopt `which get_iplayer` |
37 |
use Getopt::Long; |
38 |
search => [ 1, "search=s", 'Search', '--search <search term>', "GetOpt compliant way of specifying search args"], |
39 |
use Getopt::Long; |
40 |
# Build hash for passing to GetOptions module |
41 |
Getopt::Long::Configure("bundling"); |
42 |
Getopt::Long::Configure("pass_through"); |
43 |
Getopt::Long::Configure("no_pass_through"); |
44 |
return GetOptions(%get_opts); |
45 |
$ |
46 |
|
47 |
get_iplayer can be examined at http://linuxcentre.net/get_iplayer/get_iplayer in case I'm misunderstanding its usage. |
48 |
|
49 |
I feel really dumb - there must be something simple & logical that I'm missing here. |
50 |
|
51 |
Stroller. |