sleddergirl has asked for the wisdom of the Perl Monks concerning the following question:
We are testing a new Linux server running RHEL7 and Perl5. My Perl program (code snippet below) dies on the 'use SSSourceOrg' line (code snippet also below). This is a home-grown module as is Syslog. The difference I found between Syslog and SSSourceOrg is that Syslog has 1 function and SSSourceOrg has multiple functions. The error is "Can't locate SSSourceOrg.pm in @INC (@INC contains: /usr/local/lib64/perl5...)". The module isn't and shouldn't be part of @INC and it does exist in my PERL5LIB path. I changed SSSourceOrg.pm so that it now has only 1 function and I changed the perl program so the use line is just 'use SSSourceOrg;' and the program gets by the line successfully and dies on the next line. I'm not a Perl developer so I'm hoping that someone else has run into this problem and can tell me how to fix it without changing all of our modules to be single-function.
test1.pl #!/usr/bin/perl use English; use POSIX qw( :stdlib_h strftime getcwd ); use Getopt::Std; use FileHandle; use strict vars; use File::Basename; eval "use CVSClient"; use Syslog; # homegrown version use SSSourceOrg qw( getLibExts getLibDirs ); use SSMail qw( send );
package SSSourceOrg; use strict; use POSIX qw( :stdlib_h ); use Cwd; use File::Basename; use English; use UserIO qw( getStrUntilMatch ); require Exporter; use vars qw( $VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); $VERSION = 1.01; @ISA = qw( Exporter ); @EXPORT = (); %EXPORT_TAGS = (); @EXPORT_OK = qw( getValidModule getSSROPath getSSEditPath getPaths getRefRoot getEditRoot getQARoot getCommittedLibRoot getLinkedDir getLibExts getLibDirs getLibRegex isCopybook isCobolProgram buildcobcpy ); my @libExts = qw( LIB UNQ PRC HVD WS IO ); #my @libDirs = qw( lio lib lci lga lhv lxf ); my $libRegex = "(\\." . join( "|\\.", @libExts ) . ")"; sub getLibExts(){ return( @libExts ); } 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problems with RHEL7 and multi-function modules
by hippo (Archbishop) on Feb 12, 2016 at 13:48 UTC | |
|
Re: Problems with RHEL7 and multi-function modules
by 2teez (Vicar) on Feb 12, 2016 at 21:12 UTC | |
by Anonymous Monk on Feb 17, 2016 at 14:22 UTC |