in reply to Re^3: Error Message - PL_perl_destruct_level at /usr/lib64/perl5/DynaLoader.pm
in thread Error Message - PL_perl_destruct_level at /usr/lib64/perl5/DynaLoader.pm

On the new server, there is a perl folder and a perl5 folder. My original webpage script was pointing to the perl folder

BEGIN { my $base_module_dir = (-d '/home/jeffer36/perl' ? '/home/jeffer36/ +perl' : ( getpwuid($>) )[7] . '/perl/'); unshift @INC, map { $base_module_dir . $_ } @INC;

This produced an error because mysql.pm is located in perl5. So I added

unshift @INC, '/home/jeffer36/perl5/lib/perl5','/home/jeffer36/perl5/lib/perl5/x86_64-linux','/home/jeffer36/perl5/lib/perl5/x86_64-linux/Bundle';

It now finds mysql.pm but does not work.

Replies are listed 'Best First'.
Re^5: Error Message - PL_perl_destruct_level at /usr/lib64/perl5/DynaLoader.pm
by pryrt (Abbot) on Apr 28, 2016 at 16:55 UTC

    At least on my webserver with cPanel installation of perl modules, the documentation for installing perl modules (not sure if it's cPanel or ISP documentation) lists a 'use' statement that will set up the use-lib properly for where cPanel installs the modules. Let me go look it up:

    Your Perl script needs instructions to find the modules in your path.

    To do this, add one of the two choices below to the top of your script:

    #!/usr/bin/perl use cPanelUserConfig;

    - or -

    #!/usr/bin/perlml

    So, at least on my server, if I use the perlml version, it doesn't need the special include, but you might want to try the use cPanelUesrConfig; anyway (it may be that perlml is different on your cPanel than on mine).

Re^5: Error Message - PL_perl_destruct_level at /usr/lib64/perl5/DynaLoader.pm
by Corion (Patriarch) on Apr 28, 2016 at 16:51 UTC

    Where do the files in /home/jeffer36/perl5/ come from?

    What made them exist?

      All files either in /home/jeffer36/perl5 or in /home/jeffer36/perl came pre-installed with the new server or were installed by using the module install feature in cPanel on the new server.