Solved

Perl Module .pm changes

Posted on 2013-01-10
6
378 Views
Last Modified: 2013-01-11
I would like to update my Perl Module (.pm) file.  I made the changes using vi.  My OS is Red Hat 5.3, but when I run through the functionality of the script, it appears that it is not working or taking affect.

I am guessing I need to do something more than just edit the .pm file, but I am really at a loss here.  Any help would be appreciated.

The script does not reside in the default Perl directory.  I am also using Perl v5.8.8
0
Comment
Question by:Randy Peterson
  • 3
  • 2
6 Comments
 
LVL 26

Expert Comment

by:wilcoxon
Comment Utility
It sounds like you have another copy of the module somewhere.  You need to determine where that is and copy your updated module there.  You should be able to add something like this at the top of your script...

use My::Module;
foreach my $dir (@INC) {
    print "found in $dir\n" if (-f "$dir/My/Module.pm");
}

Open in new window

0
 
LVL 8

Author Comment

by:Randy Peterson
Comment Utility
Here is my file header:  I am absolutely new to this, so I am trying to figure this all out.  I have searched for the modules, but never found it.  I just do not ever see any changes take affect.

#file:Apache2/WapGateway.pm
#-----------------------

package Apache2::WapGateway;

  use strict;
  use warnings;
  use DBI;
  use Socket;

  use Apache2::RequestRec ();
  use Apache2::Connection ();
  use Apache2::RequestIO ();
  use Apache2::RequestUtil ();
  use Apache2::ServerUtil ();
  use Apache2::ServerRec ();
  use Apache2::Process ();
  use APR::Table ();

use Apache2::Const -compile => qw(FORBIDDEN DECLINED PROXYREQ_PROXY REDIRECT OK);
0
 
LVL 28

Accepted Solution

by:
FishMonger earned 250 total points
Comment Utility
Does the script(s) that use the module have a persistent connection to apache?

Maybe you need to restart apache?
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 26

Assisted Solution

by:wilcoxon
wilcoxon earned 250 total points
Comment Utility
I agree with FishMonger.  If this is an Apache module (as in it serves up something through apache), you likely need to restart the apache server this is running on.  If that is what it does, you probably want to look at the mod_perl apache plugin.
0
 
LVL 8

Author Comment

by:Randy Peterson
Comment Utility
I am agreeing with what you both are saying.  I unfortunately cannot restart Apache until a maintenance window tonight, so I will try to do so then and hopefully credit you for the answer.  Thanks.
0
 
LVL 8

Author Closing Comment

by:Randy Peterson
Comment Utility
You were right.  A restart of the Apache server caused the script to be re-read in.  Thanks.
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Suggested Solutions

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now