getopt long

getopt long

am 13.04.2008 15:50:38 von Michael Ellery

I've been under the impression that Getopt::Long is included with most
(if not all) distributions of perl. Recently I've encountered a few
Activestate versions that don't seem to have it installed. What the
current policy with this package - is it included? As of which version
did it become standard?

Thanks,
Mike Ellery

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: getopt long

am 13.04.2008 18:42:54 von Michael Ellery

Michael Ellery wrote:
> I've been under the impression that Getopt::Long is included with most
> (if not all) distributions of perl. Recently I've encountered a few
> Activestate versions that don't seem to have it installed. What the
> current policy with this package - is it included? As of which version
> did it become standard?
>

...and it gets worse. For those versions that seem to have Getopt::Long
but that don't have the minimum version I require (2.36), I've tried
installing the latest (using ppm), but at runtime perl always loads the
"builtin" version and not my upgraded version in site/lib. Any ideas
how I can fix this?

Thanks,
Mike Ellery

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: getopt long

am 14.04.2008 00:57:26 von Bill Luebkert

Michael Ellery wrote:
> Michael Ellery wrote:
>> I've been under the impression that Getopt::Long is included with most
>> (if not all) distributions of perl. Recently I've encountered a few
>> Activestate versions that don't seem to have it installed. What the
>> current policy with this package - is it included? As of which version
>> did it become standard?
>>
>
> ..and it gets worse. For those versions that seem to have Getopt::Long
> but that don't have the minimum version I require (2.36), I've tried
> installing the latest (using ppm), but at runtime perl always loads the
> "builtin" version and not my upgraded version in site/lib. Any ideas
> how I can fix this?

I have version 2.37 in my site/lib (not sure if that's usable or not).

Try posting the output of this script:

use strict;
use warnings;
use Getopt::Long;

print "$_\n" foreach @INC; print "\n";

print "$_ => $INC{$_}\n" foreach keys %INC;

__END__
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: getopt long

am 14.04.2008 05:31:29 von Michael Ellery

Bill Luebkert wrote:
> Michael Ellery wrote:
>> Michael Ellery wrote:
>>> I've been under the impression that Getopt::Long is included with
>>> most (if not all) distributions of perl. Recently I've encountered a
>>> few Activestate versions that don't seem to have it installed. What
>>> the current policy with this package - is it included? As of which
>>> version did it become standard?
>>>
>>
>> ..and it gets worse. For those versions that seem to have
>> Getopt::Long but that don't have the minimum version I require (2.36),
>> I've tried installing the latest (using ppm), but at runtime perl
>> always loads the "builtin" version and not my upgraded version in
>> site/lib. Any ideas how I can fix this?
>
> I have version 2.37 in my site/lib (not sure if that's usable or not).
>
> Try posting the output of this script:
>
> use strict;
> use warnings;
> use Getopt::Long;
>
> print "$_\n" foreach @INC; print "\n";
>
> print "$_ => $INC{$_}\n" foreach keys %INC;
>
> __END__
>
>

OUTPUT from a 5.8.7 installation:

C:\Documents and Settings\testuser.S2TECH>perl
//s2server1/infrastructure/libpath.pl
C:/Perl/lib
C:/Perl/site/lib
..

warnings/register.pm => C:/Perl/lib/warnings/register.pm
Carp.pm => C:/Perl/lib/Carp.pm
warnings.pm => C:/Perl/lib/warnings.pm
Exporter/Heavy.pm => C:/Perl/lib/Exporter/Heavy.pm
vars.pm => C:/Perl/lib/vars.pm
Exporter.pm => C:/Perl/lib/Exporter.pm
strict.pm => C:/Perl/lib/strict.pm
constant.pm => C:/Perl/lib/constant.pm
Getopt/Long.pm => C:/Perl/lib/Getopt/Long.pm

My local 5.8.8 installation works fine because it appears to have 2.37
"built-in", so I never had to install or upgrade. Older distributions
seem to have either not Getopt::Long or an antiquated version (I'm
relying on a function in 2.36+).

Thanks,
Mike

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: getopt long

am 14.04.2008 08:13:15 von Bill Luebkert

Michael Ellery wrote:
>
> OUTPUT from a 5.8.7 installation:
>
> C:\Documents and Settings\testuser.S2TECH>perl
> //s2server1/infrastructure/libpath.pl
> C:/Perl/lib
> C:/Perl/site/lib
> .

That's not right - site/lib should come before lib to pick up
the later modules first from the site tree. perl -V should
also show @INC reversed from what you have there. If you
can't find anything obvious - consider reinstalling it.

> warnings/register.pm => C:/Perl/lib/warnings/register.pm
> Carp.pm => C:/Perl/lib/Carp.pm
> warnings.pm => C:/Perl/lib/warnings.pm
> Exporter/Heavy.pm => C:/Perl/lib/Exporter/Heavy.pm
> vars.pm => C:/Perl/lib/vars.pm
> Exporter.pm => C:/Perl/lib/Exporter.pm
> strict.pm => C:/Perl/lib/strict.pm
> constant.pm => C:/Perl/lib/constant.pm
> Getopt/Long.pm => C:/Perl/lib/Getopt/Long.pm
>
> My local 5.8.8 installation works fine because it appears to have 2.37
> "built-in", so I never had to install or upgrade. Older distributions
> seem to have either not Getopt::Long or an antiquated version (I'm
> relying on a function in 2.36+).

It probably has site/lib first like it should be.
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs