So seems the concensus. I will be trying to adapt a module type system for it. Thanks
Dan > Dan Muey wrote: > > > > > To share configuration variables in one place for lots and lots of > > scripts to use instead of having to put them in each script > and then > > on echanges and having to go through a hundred scripts all over the > > place to change them. > > > > Someone else already helped me get it nailed down pretty well, > > basically the my was killing me and I needed to add use vars... > > > > Any other insights will be welcome. > > > > Thanks > > Dan > > I'm wondering what would keep you from simply using a config > file, and opening it to take these values as you would any > other data used in your program? Maybve I'm being > simplistic. It just seems to me that code inclusion is an > extension of hard-coding. You seem to be describing the > functionality of a system-level adapter. > > I think there is a middle ground to be found here. Your > included module could provide functions to offer such data. > This can be done pretty easily using basic stuff we've all > been batting around: > > use DansConfig("getSetting");; > > my $gatewayIP = getSetting("Gateway IP"); > > where, in DansConfig, you have a sub getSetting that opens a > file of name=value pairs, one of which is the Gateway IP. It > seems to me that this would do the job. Then, when those > values change, you might access a simlar saveSetting > function.that modifies the file, again using the > straightforward text handling at which Perl so excels. > > Joseph > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]