TimeBandit has asked for the wisdom of the Perl Monks concerning the following question:

So I’m very new to PERL and to make matters more complicated I have installed PERL to an IBM mainframe. The zOS version comes from RocketSoftware and I installed it via miniconda. I have a user that would like to us PDF::API2. If I go to metacpan.org the install instructions gives me two options, via cpanm or the cpan shell. Since this version does not come with cpanm, I wanted to install it.

After getting into the shell, I did an install App::cpanminus

At first I encountered the error of getting the 01mailrc.txt.gz file. I got passed this by doing an interactive ftp and downloading it. I found this solution searching through the forum.

The second problem was the 02packages.details.txt.gz file and I ftp’ed and got that. Still get an error as seen in the output below but it moves past that.

The third problem 03modlist.data.gz. Again I downloaded via ftp but the error seems to be “perhaps you forgot to load “CPAN::Modulelist”?”

Kinda lost where to go from here. Any help would be grateful.

bash-4.3$ perl -MCPAN -e shell Terminal does not support ▒d▒story. cpan shell -- CPAN exploration and modules installation (v2.1101) ▒ter 'h' for help. cpan[1]> install App::cpanminus ▒ading '/u/sdc/xdc020r/.cpan/sources/authors/01mailrc.txt.gz' ...................................................................... +......DONE ▒ading '/u/sdc/xdc020r/.cpan/sources/modules/02packages.details. +txt.gz' Warning: Your /u/sdc/xdc020r/.cpan/sources/modules/02packages.details. +txt.gz does not contain a Ine-Ount header. Lease check the validity of the index file by comparing it to more than one CPAN mirror. I'll continue but problems seem likely to happen. Warning: Your /u/sdc/xdc020r/.cpan/sources/modules/02packages.details. +txt.gz does not contain a Ast-Updated header. Lease check the validity of the index file by comparing it to more than one CPAN mirror. I'll continue but problems seem likely to happen. DONE ▒ading '/u/sdc/xdc020r/.cpan/sources/modules/03modlist.data.gz' Catching error: "Can't locate object method \"data\" via package \"CPA +N::Modulelist\" (perhaps you forgot to load \ "CPAN::Modulelist\"?) a +t (eval 29) line 1.\cU at /usr/lpp/perl/lib/perl5/5.24.4/CPAN/Index.p +m line 525.\cU\cECPAN:: Index::rd_modlist(\"CPAN::Index\", \"/u/sdc/x +dc020r/.cpan/sources/modules/03modlist.data.gz\") called at /usr/lpp/ +p erl/lib/perl5/5.24.4/CPAN/Index.pm line 85\cU\cECPAN::Index::reload +(\"CPAN::Index\") called at /usr/lpp/perl/lib/pe rl5/5.24.4/CPAN.pm l +ine 978\cU\cECPAN::exists(CPAN=HASH(0x1be6ff10), \"CPAN::Module\", \" +App::cpanminus\") called a t /usr/lpp/perl/lib/perl5/5.24.4/CPAN/Shel +l.pm line 1304\cU\cECPAN::Shell::expandany(\"CPAN::Shell\", \"App::cp +anmi nus\") called at /usr/lpp/perl/lib/perl5/5.24.4/CPAN/Shell.pm li +ne 1738\cU\cECPAN::Shell::rematein(\"CPAN::Shell\", \"install\", \"A +pp::cpanminus\") called at /usr/lpp/perl/lib/perl5/5.24.4/CPAN/Shell. +pm line 2063\cU\cECPAN::Shell ::__ANON__(\"CPAN::Shell\", \"App::cpan +minus\") called at /usr/lpp/perl/lib/perl5/5.24.4/CPAN.pm line 375\cU +\cEeval {...} called at /usr/lpp/perl/lib/perl5/5.24.4/CPAN.pm line +372\cU\cECPAN::shell() called at -e line 1\cU" at /usr /lpp/perl/lib/ +perl5/5.24.4/CPAN.pm line 391. CPAN::shell() called at -e line 1 ▒ading '/u/sdc/xdc020r/.cpan/sources/authors/01mailrc.txt.gz' ...................................................................... +......DONE ▒ading '/u/sdc/xdc020r/.cpan/sources/modules/02packages.details. +txt.gz' Warning: Your /u/sdc/xdc020r/.cpan/sources/modules/02packages.details. +txt.gz does not contain a Ine-Ount header. Lease check the validity of the index file by comparing it to more than one CPAN mirror. I'll continue but problems seem likely to happen. Warning: Your /u/sdc/xdc020r/.cpan/sources/modules/02packages.details. +txt.gz does not contain a Ast-Updated header. Lease check the validity of the index file by comparing it to more than one CPAN mirror. I'll continue but problems seem likely to happen. DONE ▒ading '/u/sdc/xdc020r/.cpan/sources/modules/03modlist.data.gz' Terminal does not support Et▒story. Ockfile removed. Can't locate object method "data" via package "CPAN::Modulelist" (perh +aps you forgot to load "CPAN::Modulelist"?) a t (eval 31) line 1. at /usr/lpp/perl/lib/perl5/5.24.4/CPAN/Index.pm line 525. CPAN::Index::rd_modlist("CPAN::Index", "/u/sdc/xdc020r/.cpan/s +ources/modules/03modlist.data.gz") called at /usr/lpp/perl/lib/perl5 +/5.24.4/CPAN/Index.pm line 85 CPAN::Index::reload("CPAN::Index") called at /usr/lpp/perl/lib +/perl5/5.24.4/CPAN.pm line 692 CPAN::all_objects(CPAN=HASH(0x1be6ff10), "CPAN::Distribution") + called at /usr/lpp/perl/lib/perl5/5.24.4/CPA N/Shell.pm line 1110 CPAN::Shell::find_failed("CPAN::Shell", 1) called at /usr/lpp/ +perl/lib/perl5/5.24.4/CPAN/Shell.pm line 1074 CPAN::Shell::failed("CPAN::Shell", 1, 1) called at /usr/lpp/pe +rl/lib/perl5/5.24.4/CPAN.pm line 413 eval {...} called at /usr/lpp/perl/lib/perl5/5.24.4/CPAN.pm li +ne 413 CPAN::shell() called at -e line 1 bash-4.3$

Replies are listed 'Best First'.
Re: New to PERL
by swl (Prior) on Mar 24, 2022 at 00:36 UTC
      Thank you. Yes I think I am encountered a lot of ACSII/EDCDIC issues. I know went through a lot of the readme file or it was a port of the miniconda document when I first installed Perl. I'm going to take a deeper look at it.
Re: New to Perl -- zOS perlos390
by Discipulus (Canon) on Mar 24, 2022 at 08:13 UTC
    Hello TimeBandit and welcome to the monastery and to the wonderful world of perl!

    As first, pedantic, note I feel the need to say that PERL simply does not exists: perl is the program and Perl is the language.

    Then, after pointing you to the perlos390 official doc (already pointed by swl in the github, probably more up to date incarnation), I have found an IBM official document about the porting of perl 5.8 which is from 2006 but probably worth to investigate. See also this.

    PS retitled for searchability

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

      z/OS is actively worked on, mainly by Karl. I helped out with the main update of "recent" perl builds, but all credits should go to Karl.

      After we got dynamic builds to work, third parties took over and are working on ASCII builds of perl on z/OS. That however is not finished as of today. It is work in progress.

      For the most recent updates, follow README.os390


      Enjoy, Have FUN! H.Merijn
      Yeah, that is old. Perl was apart of IBM Ported Tools, awhile back, along with a few other things. Just going to keep at it.
Re: New to PERL
by bliako (Abbot) on Mar 24, 2022 at 10:54 UTC

    Searching for "does not contain a Line-Count header" sent me here . Their solution is to **erase** the ~/.cpan by mv ~/.cpan ~/.cpan-ori ; cpan -u (the same user you are trying to install). You can restore it back by rm -rf ~/.cpan; mv ~/.cpan-ori ~/.cpan ; cpan -u. They also mention that cpan and perl versions must match. WARNING: as it involves erasing a folder, check that this is OK. Also, you don't seem to run this as root?

    bw, bliako

      Thanks. Yes I read that also. Not running as root. Have a few extra things in my .profile and I didn't want to screw up any one else. But I can try it with root.
Re: New to PERL
by TimeBandit (Novice) on Mar 25, 2022 at 17:10 UTC
    So I went through the perl readme on github. And I wanted to do this over from scratch. In the Readme file I started at

    Building a 64-bit Dynamic EBCDID Perl

    On my windows desktop I installed Git.

    Went into Git Bash

    Did the git clone of perl

    Changed directory to perl

    I had to set the PERL5LIB path
    %ENV:
    PERL5LIB="/c/perl/cpan/Extutils-Manifest/lib:/c/greene/perl"
    @INC:
    /c/perl/cpan/Extutils-Manifest/lib
    /c/perl
    /usr/lib/perl5/site_perl
    /usr/share/perl5/site_perl
    /usr/lib/perl5/vendor_perl
    /usr/share/perl5/vendor_perl
    /usr/lib/perl5/core_perl
    /usr/share/perl5/core_perl

    The first path was for the Manifest.pm which allowed me to run the Porting/makerel -e

    I am not sure what other paths I need because I get the following from the Porting.

    $ Porting/makerel -e
    #define PERL_REVISION 5 /* age */
    #define PERL_VERSION 35 /* epoch */
    #define PERL_SUBVERSION 11 /* generation */
    #define PERL_API_REVISION 5
    #define PERL_API_VERSION 35
    #define PERL_API_SUBVERSION 11
    #define __PATCHLEVEL_H_INCLUDED__
    # define PERL_PATCHNUM "UNKNOWN-miniperl"
    # define PERL_GIT_UNPUSHED_COMMITS /*leave-this-comment*/

    # define PERL_PATCHNUM "UNKNOWN-microperl"
    # define PERL_GIT_UNPUSHED_COMMITS /*leave-this-comment*/
    # define LOCAL_PATCH_COUNT \
    #define PATCHLEVEL PERL_VERSION
    #define SUBVERSION PERL_SUBVERSION

    Making a release for perl-5.35.11 in ../perl-5.35.11

    Cross-checking the MANIFEST...

    Creating ../perl-5.35.11 release directory...

    Copying files to release directory...
    sh: cpio: command not found
    awk '{print $1}' MANIFEST | cpio -pdm ../perl-5.35.11 failed at Porting/makerel
    line 125.

    I’m learning a ton but just don’t know enough.
      Rather than building an unstable "blead", I'd rather go for a stable version. You can get it from https://www.perl.org/get.html.

      map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
      Have gotten past this, as I installed Ubuntu to my windows machine. Created the tar.gz file. SFTP to the mainframe. Now I am working on a C compiler issues.