Skip to content

Using relative path in config leads to modules not found. #62

@redstar

Description

@redstar

Using perlport_814 and this diag.pl file:

use diagnostics;

I get

>perl diag.pl
couldn't find diagnostic data in ../lib/5.37.11/pods/perldiag.pod /plex/knacke/zopen/prod/perl/lib/5.37.11/os390 /plex/knacke/zopen/prod/perl/lib/5.37.11 /plex/knacke/zopen/prod/perl/lib/5.37.11/os390 ../lib/site_perl/5.37.11/os390 ../lib/site_perl/5.37.11 ../lib/5.37.11/os390 ../lib/5.37.11 diag.pl at /plex/knacke/zopen/prod/perl/lib/5.37.11/diagnostics.pm line 259, <POD_DIAG> line 718.
Compilation failed in require at diag.pl line 1.
BEGIN failed--compilation aborted at diag.pl line 1.

The problem boils down to the relative path while searching for the module. diagnistics.pm uses $Config{privlibexp} to search for the perldiag.pod, which has the value ../lib/5.37.11. This directory does not exist if used relative to $PWD.

perl -V shows the include path:

  @INC:
    /plex/knacke/zopen/prod/perl/lib/5.37.11/os390
    /plex/knacke/zopen/prod/perl/lib/5.37.11
    /plex/knacke/zopen/prod/perl/lib/5.37.11/os390
    ../lib/site_perl/5.37.11/os390
    ../lib/site_perl/5.37.11
    ../lib/5.37.11/os390
    ../lib/5.37.11

Compared to Ubuntu (were it works):

  @INC:
    /etc/perl
    /usr/local/lib/s390x-linux-gnu/perl/5.34.0
    /usr/local/share/perl/5.34.0
    /usr/lib/s390x-linux-gnu/perl5/5.34
    /usr/share/perl5
    /usr/lib/s390x-linux-gnu/perl-base
    /usr/lib/s390x-linux-gnu/perl/5.34
    /usr/share/perl/5.34
    /usr/local/lib/site_perl

Solution seems to only use absolute paths.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions