This application is used to perform diagnsotics on a carrier grade chassis. The problem I am seeing is this. In the main script (tdf.pl) I make a call to display_cfg(). his takes the output from a diangostic test and writes it back to the main canvas window. I make this call succesfully in the cp50.pm perl module. I attempt to make this same call in the fs_ipmi.pm module, I receive the following error message:cp50.pm fs_ipmi.pm support_libs.pm
Here are my decalrations: tdf.pl -Can't locate pacakge tdf for @fs_ipmi::ISA at fs_ipmi line 213 (<-- wh +ere the display_cfg() sub is called...) Can't locate pacakge tdf for @support_libs::ISA at fs_ipmi.pm line 213 + (<-- redundancy here???) Tk::Error: Undefined subroutine &fs_ipmi::display_msg called at fs_ipm +i.pm line 213. Tk callback for .frame.button Tk::__ANON__ at /usr/local/lib/perl5/site_perl/5.8.6/i686-linux/Tk.p +m line 247 Tk::Button::butUp at /usr/local/lib/perl5/site_perl/5/8/6/i686-linux +/Tk/Button.pm line 111 <ButtonRelease-1> <command bound to event)
cp50.pm:use Tk 800.000; use Tk::DialogBox; use FileHandle; use strict; #use warnings; use support_libs; use fs_config; use fs_ipmi; require Exporter; our @EXPORT = qw(display_msg display_cfg warning_dlog MyDialog); our @ISA = qw(Exporter cp50 support_libs); @EXPORT = qw(); #--------------------------------------------------------------------- +-----------------------# # sub display_cfg() + # # This subroutine will write a simple message or text string to the me +ssage canvas than # # comprises a portion of the UI application. + # #--------------------------------------------------------------------- +-----------------------# sub display_cfg { my ($rec) = @_; my ($line) = "$rec"; $disp->insert("end", $line); }
fs_ipmi.pm:#use strict; #use fs_config; use fs_config; use fs_ipmi; use Getopt::Long;
Thank you in advance. Sorry if this is long-winded.package fs_ipmi; require Exporter; @ISA = qw(Exporter tdf support_libs); @EXPORT = qw(GetDebugInfo ReserveDPV DeleteDPV SetPowerState SetResetState SetControlState GetControlState GetSensorReading RestoreFactoryDefaults StoreParameters SetAudibleState GetEventReceiver GetSensorThresholds SetSensorThresholds GetSensorEventEnable SetSensorEventEnable GetSlotGA GetDeviceID SServerUp Slot2HexAdrs GetPERStatus GetDebugInfo SetRelayState GetRelayState Fast_fs_ipmi GetSELInfo ReserveSEL ClearSEL GetSELTime SetSELTime GetIPMIEnableState); support_libs.pm: package support_libs; use Exporter; our @EXPORT = qw(write_dlog defineBlades debug_ip convert_slot System_ +tests chassis_status); our @ISA = qw(Exporter tdf); use Switch; use fs_ipmi; use Tk 800.00; use Tk::DialogBox;
Joe
In reply to Scope issue in perl/tk application by joec
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |