FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 12-25-2009, 03:21 PM
Stroller
 
Default Installation (or not) of Perl Getopt::Long

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.
 
Old 12-25-2009, 03:50 PM
Stroller
 
Default Installation (or not) of Perl Getopt::Long

On 25 Dec 2009, at 16:21, Stroller wrote:
> ...
> 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?

Ok, please ignore me:

"Getopt::Std and Getopt::Long are both supplied with the
standard Perl distribution. There are currently six other
Getopt:: modules available on CPAN."

http://world.std.com/~swmcd/steven/perl/pm/getopt.html
 
Old 12-26-2009, 10:48 AM
Stefan Schulte
 
Default Installation (or not) of Perl Getopt::Long

Hi Stroller,

you may also want to look at Getopt:eclare. 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.
>
>
 
Old 01-09-2010, 06:23 AM
Stroller
 
Default Installation (or not) of Perl Getopt::Long

Thanks for your reply, Stefan, and sorry not to have responded sooner.

By the time you replied, I had already committed some to grappling
with Getopt::Long and had worked through some examples. I won't bore
you with the explanation of why getopts became no longer relevant.


Stroller.



On 26 Dec 2009, at 11:48, Stefan Schulte wrote:

you may also want to look at Getopt:eclare. If you dont want to do
something fancy you just have to write the »program -help« page and
you're done.
I have been experimenting with the Getopt::Long module, which seems
to be working fine, but I'm considering Getopt::Tabular instead.
 

Thread Tools




All times are GMT. The time now is 12:30 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org