Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Aug 2000
Posts: 335
Member
Member
Offline
Joined: Aug 2000
Posts: 335
Burak & Charles:

Thanks for your help. I think I've re-familiarized myself with Perl adequately for the time being. smile

For what I'm doing now, I didn't really need global "variables", but only constants, so I've set up the config module like this:

Code
package MyDefs;

...
use constant DEST_BASE_DIR => 'c:/backup';
use constant LOCK_FILENAME => "@{[DEST_BASE_DIR]}/backup_lock";
use constant LIST_FILENAME => 'backup.lst';
use constant CMD_FILENAME => 'backup.cmd';
...

1;
Then in other modules, I can reference the constants like this:

Code
...
use MyDefs();
...
open(my $fh_lock, '>', MyDefs::LOCK_FILENAME);
...
my $cmd = "$dest_dir/@{[MyDefs::CMD_FILENAME]}";
...

Sponsored Links
Entire Thread
Subject Posted By Posted
Loading a package from another package Dave_L 10/08/2003 5:21 AM
Re: Loading a package from another package Charles Capps 10/08/2003 5:39 AM
Re: Loading a package from another package Dave_L 10/08/2003 6:11 AM
Re: Loading a package from another package Charles Capps 10/08/2003 6:28 AM
Re: Loading a package from another package Burak 10/08/2003 6:04 PM
Re: Loading a package from another package Dave_L 10/08/2003 6:43 PM
Re: Loading a package from another package Burak 10/08/2003 6:55 PM
Re: Loading a package from another package Charles Capps 10/08/2003 7:24 PM
Re: Loading a package from another package Burak 10/08/2003 7:40 PM
Re: Loading a package from another package Dave_L 10/08/2003 7:56 PM
Re: Loading a package from another package Charles Capps 10/08/2003 8:27 PM
Re: Loading a package from another package Burak 10/08/2003 8:35 PM
Re: Loading a package from another package Dave_L 10/08/2003 8:41 PM
Re: Loading a package from another package Dave_L 10/08/2003 8:52 PM
Re: Loading a package from another package Burak 10/08/2003 8:58 PM
Re: Loading a package from another package Dave_L 10/08/2003 9:09 PM
Re: Loading a package from another package Burak 10/08/2003 9:39 PM
Re: Loading a package from another package Dave_L 10/08/2003 11:31 PM
Re: Loading a package from another package Burak 10/08/2003 11:37 PM
Re: Loading a package from another package Burak 10/08/2003 11:38 PM
Re: Loading a package from another package Dave_L 10/09/2003 7:58 AM
Re: Loading a package from another package Charles Capps 10/09/2003 8:04 AM
Re: Loading a package from another package Dave_L 10/09/2003 8:17 AM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Zarzal
Zarzal
Berlin, Germany
Posts: 808
Joined: July 2001
Forum Statistics
Forums63
Topics37,575
Posts293,932
Members13,824
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,835
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)