Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Perl Module .pm changes

Posted on 2013-01-10
6
Medium Priority
?
398 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 27

Expert Comment

by:wilcoxon
ID: 38764328
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
ID: 38764436
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 1000 total points
ID: 38764634
Does the script(s) that use the module have a persistent connection to apache?

Maybe you need to restart apache?
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 27

Assisted Solution

by:wilcoxon
wilcoxon earned 1000 total points
ID: 38764689
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
ID: 38765222
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
ID: 38769121
You were right.  A restart of the Apache server caused the script to be re-read in.  Thanks.
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Six Sigma Control Plans

636 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