Ronnie has asked for the wisdom of the Perl Monks concerning the following question:
The problem is that the ACC_Heather module uses some of the subroutines contained within ACC_Various. I thought that this would be simple enough - it may well be but I'm probably a lot simpler!! I put a use ACC_Various inside the ACC_Heather module :-############################################################### use lib '/home/interface/scripts/Perl_Modules' ; # Where the in-ho +use modules live # # In-House written modules #--------------------------# use ACC_Heather ; use ACC_Various qw(end_it mail mail_log update_report date_validation) + ;
thinking that if I prefixed every call of an ACC_Various subroutine within ACC_Heather with ACC_Various:: everything would be fine.package ACC_Heather ; # our @EXPORT = qw(ACC_IHS_PROFILE run_SQLPLUS ACC_PUT_STEP ACC_GET_STEP + ACC_BOX Update_Job_Status_Log ) ; #our @EXPORT_OK = qw() ; use Exporter ; our @ISA = qw(Exporter) ; # use ACC_Various qw(end_it mail mail_log update_report date_validation) + ;
Nope!! I got that wrong! The very first call to update report results in the following error :-if (! -e $SQL_script) { $msg = "SQL script $SQL_script does not exist" ; if (! ACC_Various::&update_report("$logfile","$msg",1,1,0)) { print "\n\tUnable to run Sub update_report :: $!\n" ; } print "\n\t$msg\n" ; print "\t*****************************************\n" ; print "\t* Contact Analyst in Team 1 - Urgently! *\n" ; print "\t*****************************************\n" ; return 0 ; }
Am I missing something very obvious or can/should this not be done? See what I mean about confusion! (Okay I admit it I made a typo in a reply!) I've tried all of the following :-Undefined subroutine &ACC_Heather::update_report called at /home/inter +face/scrip ts/Perl_Modules/ACC_Heather.pm line 737.
Any other suggestions? I could be really boring and copy all of the subroutines from ACC_Various into ACC_Heather but .... I'd learn nothing. Thanks in advance.package ACC_Various ; # our @EXPORT = qw(end_it mail mail_log date_validation ACC_BOX) ; our @EXPORT_OK = qw(run_SQLPLUS update_report error_report) ; use Exporter ; our @ISA = qw(Exporter) ; #
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Module Confusion?
by themage (Friar) on Dec 07, 2006 at 11:40 UTC | |
|
Re: Module Confusion?
by jonadab (Parson) on Dec 07, 2006 at 11:34 UTC | |
by Ronnie (Scribe) on Dec 07, 2006 at 11:54 UTC | |
|
Re: Module Confusion?
by reneeb (Chaplain) on Dec 07, 2006 at 11:42 UTC |