in reply to Questions about mod_perl modules and dependencies.

1) Yes, you have to compile it yourself using your newer perl.

2) mod_perl will search the @INC that it reports for installed modules. If your question meant something else, please elaborate.

3) You can't - the mod_perl package depends on the perl package.

If you want to use a newer perl for some reason then you would be better off compiling and installing it and its modules (including mod_perl) yourself and ignoring the system perl entirely. There have been many, many discussions about this here in the past.

As an aside, Rocky 9 will be out soon since RHEL 9 is in late beta so if you just want something newer than 5.26.3 then maybe wait a few months and you could use that as your distro and have it all packaged for you.

Does it matter under which user I install perl-modules using cpan? So far I use root because I get some permission issues e.g. while installing DBI.

It matters. You must install as root if you want to install them in a directory which is only writable by root of course. But maybe you don't need to install them there? Either way, only install as root - don't compile or test as root for security reasons. cpanm has the handy --sudo option for operating in this way.


🦛

Replies are listed 'Best First'.
Re^2: Questions about mod_perl modules and dependencies.
by feumw (Sexton) on Apr 04, 2022 at 10:07 UTC

    Sorry for answering late.
    2) @INC is an array with paths where perl is looking for modules. As far as I know @INC is set to the system default perl (let's call it "system-perl" for now). So if I would install a second perl (let's call it "rh-perl") on my linux it would install perl under /opt/rh-perl/5.xx.x, how does this affect @INC? Would @INC still show the system-perl paths instead of my rh-perl paths? Would it show both paths?
    I'd assume each perl version got a different @INC array. system-perl got different path's in it then rh-perl does. So if I would compile mod_perl with rh-perl @INC for mod_perl then would be the new rh-perl paths, right?

    Even Rocky 8 is totally fine for me. It's just for an proof of concept where I need perl. The original vm used to be CentOS7 which had perl 5.16.3 which doesn't work for this task.

      Each perl binary will have its own @INC and IIRC the mod_perl that you build using that perl binary inherits the @INC from it. However, the @INC which any particular mod_perl installation starts with can always be modified in the configuration afterwards so it is not the be all and end all to get it right first time.


      🦛

        Thank you sir.