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;

In reply to Problems with RHEL7 and multi-function modules by sleddergirl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.