Perl module error in testing

[LEFT]PERL MODULE :
To debug my perl module code in test environment. I have taken production module to the test in the my home path directory and was trying to test it by changing the below path in my test code.
But still i am getting the error to debug it. can you please let me knw whether i am correct.

Production Code :
use strict;                                                        
use banking::field;   
Test code :
use strict
use banking "/home/prod/banking/field";
use banking::field;
Error getting below 
Use of qw(...) as parentheses is deprecated at banking/field.pm line 1493.
Can't locate object method "new" via package "banking::field" (perhaps you forgot to load "banking::field"?) at testout.pl line 42.

[/LEFT]

You need to use require if you have to give full path of the module.

OR,

use lib qw(/home/prod/banking /home/prod/banking/field);
use banking::field;   

please confirm whether the below changes is correct.

use strict;
use lib qw(/home/prod/lib  /home/prod/lib/field);
use lib::field;

 
prod@500:/home/prod/lib> ls -ltr

  105144 Feb 27 07:22 field.pm

I didn't ask to put the modules in a dir with name "lib".
You have to do exactly what I had mentioned.

use lib qw(/home/prod/banking /home/prod/banking/field);
use banking::field;

The above command expecting that you have banking.pm in "/home/prod/banking" dir and field.pm in "/home/prod/banking/field" dir.

use strict;
use lib qw(/home/prod/banking/ /home/prod/banking/field);
use banking::field;

Still its not working.

Error :
Use of qw(...) as parentheses is deprecated at banking/field.pm line 1493.
Can't locate object method "new" via package "banking::field" (perhaps you forgot to load "banking::filed"?) at testoutputs.pl line 42.

---------- Post updated at 04:25 AM ---------- Previous update was at 02:42 AM ----------

any idea why it is not working when I placed the module in my home directories.

Check spelling of your module name.

name is correct. I tried for another program still getting the same messge.
The below line I am getting in production as well so no probs.

Use of qw(...) as parentheses is deprecated at lib/mask.pm line 1493.

Can you please let me know why I am getting this

Can't locate object method "new" via package "lib::mask" (perhaps you forgot to load "lib::mask"?) at testout.pl line 40.

There are couple of ways I remember as I haven't worked on perl for a long time.

Instead using

use lib qw(/home/prod/banking/ /home/prod/banking/field);

You can use

use lib '/home/prod/banking';
use lib '/home/prod/banking/field';

OR
You can also try to set PERL5LIB env variable.

PERL5LIB=$PERL5LIB:/home/prod/banking:/home/prod/banking/field
export PERL5LIB

The problem is in order to test the code. I thought of taking the backup of module to my home path and debug the code. the production Module in present in the perl library function. I have taken the ctl folder /opt/acc_perl/lib/site_perl/5.14.2/ctl in the perl area to my home path /home/prod/ctl/prod.pm

Production code :
 
use ctl::Prod;
 

Can you let us know what need to be changed in the code to debug the module from my home path

Sorry. I think I didn't get your point or you changed your problem. You can expect other replies.

can you please let me know what I need to know for the above scenario, in the case perl module location is moved to my home path area.

Any module/path you add with use lib or PERL5LIB will be loaded first if found.
So, If you do

use lib '/home/prod/ctl/';
use ctl::Prod;

at the beginning of the script, your home-Dir module would be loaded instead of standard location.

still I am getting same error.

Can't locate object method "new" via package "ctl::Prod" (perhaps you forgot to load "lib::Prodmask"?) at testout.pl line 40.

do I need to export any variable

---------- Post updated at 06:27 AM ---------- Previous update was at 06:24 AM ----------

currently there is no environment variable set for the below,

 
 echo $PERL5LIB
su: PERL5LIB: Parameter not set.

let me know how to set the environment variable for my case.

---------- Post updated at 10:15 PM ---------- Previous update was at 06:27 AM ----------

can you let me know your comments for the above problem..

Where are "ctl::Prod" and "lib::Prodmask" located in the filesystem in which you are running your Perl program?