Discussion:
Missing perl module
(too old to reply)
John Smith
2022-03-26 22:35:25 UTC
Permalink
I have a Perl application in 15.0 which, when invoked, returns
the following diagnostic:

Can't locate getopts.pl in @INC (@INC contains: /usr/local/lib64/perl5 /
usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/
vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/local/bin/xtt line
20

Anybody know what Slackbuilds package must be installed in order
to get this to work?
Rinaldi
2022-03-27 02:21:13 UTC
Permalink
Post by John Smith
I have a Perl application in 15.0 which, when invoked, returns
usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/
vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/local/bin/xtt line
20
Anybody know what Slackbuilds package must be installed in order
to get this to work?
I don't know that it's in a slackware package but installing it is
pretty trivial if you use perl.

# perl -MCPAN -e shell

cpan shell -- CPAN exploration and modules installation (v2.28)
Enter 'h' for help.

cpan[1]> install getopts
...........


Rinaldi
--
Critic, n.:
A person who boasts himself hard to please because nobody tries
to please him. -- Ambrose Bierce, "The Devil's Dictionary"
John Smith
2022-03-27 16:51:39 UTC
Permalink
Post by Rinaldi
Post by John Smith
I have a Perl application in 15.0 which, when invoked, returns
/ usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/
vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/local/bin/xtt
line 20
Anybody know what Slackbuilds package must be installed in order
to get this to work?
I don't know that it's in a slackware package but installing it is
pretty trivial if you use perl.
# perl -MCPAN -e shell
cpan shell -- CPAN exploration and modules installation (v2.28) Enter
'h' for help.
cpan[1]> install getopts ...........
Thanks. The installed it all right, but the issue persists as
described. When I check out the xtt Perl application, line 20 is the
following:

require "getopts.pl"; # &Getopts()

The thing is, getopts.pl is indeed nowhere available in my system.

The script that I am trying to execute is a bit old, but it still
worked fine under Slackware 14.2. Might it be the case that, in 15.0, one
must use a different Perl module here?
Rinaldi
2022-03-27 17:10:44 UTC
Permalink
Post by John Smith
Post by Rinaldi
Post by John Smith
I have a Perl application in 15.0 which, when invoked, returns
/ usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/
vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/local/bin/xtt
line 20
Anybody know what Slackbuilds package must be installed in order
to get this to work?
I don't know that it's in a slackware package but installing it is
pretty trivial if you use perl.
# perl -MCPAN -e shell
cpan shell -- CPAN exploration and modules installation (v2.28) Enter
'h' for help.
cpan[1]> install getopts ...........
Thanks. The installed it all right, but the issue persists as
described. When I check out the xtt Perl application, line 20 is the
require "getopts.pl"; # &Getopts()
The thing is, getopts.pl is indeed nowhere available in my system.
The script that I am trying to execute is a bit old, but it still
worked fine under Slackware 14.2. Might it be the case that, in 15.0, one
must use a different Perl module here?
Old program? See
https://unix.stackexchange.com/questions/224716/perl-library-getopts-pl

Rinaldi
--
Critic, n.:
A person who boasts himself hard to please because nobody tries
to please him. -- Ambrose Bierce, "The Devil's Dictionary"
John Smith
2022-03-27 21:17:13 UTC
Permalink
Post by Rinaldi
Post by John Smith
Post by Rinaldi
Post by John Smith
I have a Perl application in 15.0 which, when invoked, returns
/usr/local/lib64/perl5 / usr/local/share/perl5
/usr/lib64/perl5/vendor_perl /usr/share/perl5/
vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/local/bin/xtt
line 20
Anybody know what Slackbuilds package must be installed in order
to get this to work?
I don't know that it's in a slackware package but installing it is
pretty trivial if you use perl.
# perl -MCPAN -e shell
cpan shell -- CPAN exploration and modules installation (v2.28) Enter
'h' for help.
cpan[1]> install getopts ...........
Thanks. The installed it all right, but the issue persists as
described. When I check out the xtt Perl application, line 20 is the
require "getopts.pl"; # &Getopts()
The thing is, getopts.pl is indeed nowhere available in my system.
The script that I am trying to execute is a bit old, but it still
worked fine under Slackware 14.2. Might it be the case that, in 15.0,
one must use a different Perl module here?
Old program? See
https://unix.stackexchange.com/questions/224716/perl-library-getopts-pl
Rinaldi
Thanks. I checked out that link and attempted to install
Perl4::CoreLibs by hand, using perl -MCPAN -e shell. The installation
took a while and ended up with the following:

Configuring Z/ZE/ZEFRAM/Perl4-CoreLibs-0.004.tar.gz with Build.PL
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Perl4-CoreLibs' version '0.004'
ZEFRAM/Perl4-CoreLibs-0.004.tar.gz
/usr/bin/perl5.34.0 Build.PL -- OK
Running Build for Z/ZE/ZEFRAM/Perl4-CoreLibs-0.004.tar.gz
Building Perl4-CoreLibs
ZEFRAM/Perl4-CoreLibs-0.004.tar.gz
./Build -- OK
The current configuration of allow_installing_outdated_dists is 'ask/
yes', but for this option we would need 'CPAN::DistnameInfo' installed.
Please install 'CPAN::DistnameInfo' as soon as possible. As long as we
are not equipped with 'CPAN::DistnameInfo' this option does not take
effect
Running Build test for ZEFRAM/Perl4-CoreLibs-0.004.tar.gz
t/abbrev.t ...... ok
t/bigfloat.t .... ok
t/bigint.t ...... ok
t/getopt.t ...... ok
t/getopts.t ..... ok
t/hostname.t .... ok
t/newgetopt.t ... ok
t/open2.t ....... ok
t/open3.t ....... ok
t/pod_cvg.t ..... skipped: Test::Pod::Coverage not available
t/pod_syn.t ..... skipped: Test::Pod not available
t/shellwords.t .. ok
t/timelocal.t ... 1/135
# Failed test 'timelocal year for 1970 1 2 0 0 0'
# at t/timelocal.t line 36.
# got: '170'
# expected: '70'

# Failed test 'timegm year for 1970 1 2 0 0 0'
# at t/timelocal.t line 49.
# got: '170'
# expected: '70'
# Looks like you failed 2 tests of 135.
t/timelocal.t ... Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/135 subtests

Test Summary Report
-------------------
t/timelocal.t (Wstat: 512 Tests: 135 Failed: 2)
Failed tests: 31, 37
Non-zero exit status: 2
Files=13, Tests=823, 2 wallclock secs ( 0.15 usr 0.04 sys + 1.33 cusr
0.19 csys = 1.71 CPU)
Result: FAIL
Failed 1/13 test programs. 2/823 subtests failed.
ZEFRAM/Perl4-CoreLibs-0.004.tar.gz
./Build test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports ZEFRAM/Perl4-CoreLibs-0.004.tar.gz
Failed during this command:
ZEFRAM/Perl4-CoreLibs-0.004.tar.gz : make_test NO

After this, there still is no getopts.pl, and the application
fails as before.
John Smith
2022-03-27 21:44:20 UTC
Permalink
Post by John Smith
Post by Rinaldi
Post by John Smith
Post by Rinaldi
Post by John Smith
I have a Perl application in 15.0 which, when invoked, returns
/usr/local/lib64/perl5 / usr/local/share/perl5
/usr/lib64/perl5/vendor_perl /usr/share/perl5/
vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/local/bin/xtt
line 20
Anybody know what Slackbuilds package must be installed in order
to get this to work?
I don't know that it's in a slackware package but installing it is
pretty trivial if you use perl.
# perl -MCPAN -e shell
cpan shell -- CPAN exploration and modules installation (v2.28) Enter
'h' for help.
cpan[1]> install getopts ...........
Thanks. The installed it all right, but the issue persists as
described. When I check out the xtt Perl application, line 20 is the
require "getopts.pl"; # &Getopts()
The thing is, getopts.pl is indeed nowhere available in my system.
The script that I am trying to execute is a bit old, but it still
worked fine under Slackware 14.2. Might it be the case that, in 15.0,
one must use a different Perl module here?
Old program? See
https://unix.stackexchange.com/questions/224716/perl-library-getopts-pl
Rinaldi
Thanks. I checked out that link and attempted to install
Perl4::CoreLibs by hand, using perl -MCPAN -e shell. The installation
Configuring Z/ZE/ZEFRAM/Perl4-CoreLibs-0.004.tar.gz with Build.PL
Created MYMETA.yml and MYMETA.json Creating new 'Build' script for
'Perl4-CoreLibs' version '0.004'
ZEFRAM/Perl4-CoreLibs-0.004.tar.gz /usr/bin/perl5.34.0 Build.PL -- OK
Running Build for Z/ZE/ZEFRAM/Perl4-CoreLibs-0.004.tar.gz Building
Perl4-CoreLibs
ZEFRAM/Perl4-CoreLibs-0.004.tar.gz ./Build -- OK
The current configuration of allow_installing_outdated_dists is 'ask/
yes', but for this option we would need 'CPAN::DistnameInfo' installed.
Please install 'CPAN::DistnameInfo' as soon as possible. As long as we
are not equipped with 'CPAN::DistnameInfo' this option does not take
effect Running Build test for ZEFRAM/Perl4-CoreLibs-0.004.tar.gz
t/abbrev.t ...... ok t/bigfloat.t .... ok t/bigint.t ...... ok
t/getopt.t ...... ok t/getopts.t ..... ok t/hostname.t .... ok
t/newgetopt.t ... ok t/open2.t ....... ok t/open3.t ....... ok
t/pod_cvg.t ..... skipped: Test::Pod::Coverage not available t/pod_syn.t
..... skipped: Test::Pod not available t/shellwords.t .. ok
t/timelocal.t ... 1/135 # Failed test 'timelocal year for 1970 1 2 0 0
0'
# at t/timelocal.t line 36.
# got: '170'
# expected: '70'
# Failed test 'timegm year for 1970 1 2 0 0 0'
# at t/timelocal.t line 49.
# got: '170'
# expected: '70'
# Looks like you failed 2 tests of 135.
t/timelocal.t ... Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/135 subtests
Test Summary Report -------------------
t/timelocal.t (Wstat: 512 Tests: 135 Failed: 2)
Failed tests: 31, 37 Non-zero exit status: 2
Files=13, Tests=823, 2 wallclock secs ( 0.15 usr 0.04 sys + 1.33 cusr
0.19 csys = 1.71 CPU)
Result: FAIL Failed 1/13 test programs. 2/823 subtests failed.
ZEFRAM/Perl4-CoreLibs-0.004.tar.gz ./Build test -- NOT OK
reports ZEFRAM/Perl4-CoreLibs-0.004.tar.gz
ZEFRAM/Perl4-CoreLibs-0.004.tar.gz : make_test NO
After this, there still is no getopts.pl, and the application
fails as before.
I got kind of fed up with this: I ended up getting an RPM for
Centos 8 which contains the damn getopts.pl file, I extracted it, copied
it to /usr/share/perl5/vendor_perl, and the script works.
Giovanni
2022-03-27 10:06:29 UTC
Permalink
I have a Perl application in 15.0 which, when invoked, returns the
/usr/local/lib64/perl5 / usr/local/share/perl5
/usr/lib64/perl5/vendor_perl /usr/share/perl5/ vendor_perl
/usr/lib64/perl5 /usr/share/perl5) at /usr/local/bin/xtt line 20
Anybody know what Slackbuilds package must be installed in order to
get this to work?
I have the getopts module for perl in directory /usr/share/perl5/ and
the files are "Getopt/Long.pm" and "Getopt/Std.pm".

They are part of the standard Slackware installation of perl and I don't
recall any getopts.pl being part of previous 14.x releases.

See the Getopt::Long(3) and Getopt::Std(3) man pages.

Ciao
Giovanni
--
A computer is like an air conditioner,
it stops working when you open Windows.
< http://giovanni.homelinux.net/ >
Henrik Carlqvist
2022-03-28 05:28:18 UTC
Permalink
Post by Giovanni
I have the getopts module for perl in directory /usr/share/perl5/ and
the files are "Getopt/Long.pm" and "Getopt/Std.pm".
They are part of the standard Slackware installation of perl and I don't
recall any getopts.pl being part of previous 14.x releases.
That seems right, the file getopts.pl is missing in Slackware 14.2, but I
have that file on two older Slackware installations (12.0 and 9.1) where
that file came from the packages perl-5.8.8-i486-4 and perl-5.8.0-i486-5.
But as you say, that file is missing from the Slackware 14.2 package
perl-5.22.2-x86_64-1.

regards Henrik
Eli the Bearded
2022-03-28 20:56:33 UTC
Permalink
In alt.os.linux.slackware,
Post by Henrik Carlqvist
Post by Giovanni
I have the getopts module for perl in directory /usr/share/perl5/ and
the files are "Getopt/Long.pm" and "Getopt/Std.pm".
That seems right, the file getopts.pl is missing in Slackware 14.2, but I
have that file on two older Slackware installations (12.0 and 9.1) where
that file came from the packages
This is a Perl version change thing, not a Slackware specific thing.
Plain 'getopts.pl' is a Perl version 4 script which was deprecated but
kept in the standard distribution for years. They did eventually drop it
in newer releases, and now Slackware has caught up with that. The Getopt
module is the modern replacement. As mentioned else thread, there's a
Perl4 compatibility package that can help.

Elijah
------
never did much with perl4

Loading...