Just another Perl shrine | |
PerlMonks |
Re: Variable Declarationby buckaduck (Chaplain) |
on Oct 19, 2001 at 18:17 UTC ( [id://119993]=note: print w/replies, xml ) | Need Help?? |
Not only does the use of a configuration file make the scripts more maintainable, it can be used to increase security.
If you're accessing a database and don't want to prompt for a username and password every time, you can keep the username and password information in the configuration file. Be sure to set the permissions of the configuration file so that it is only readable by a certain group (It's probably best to have a new group created for this purpose only). Set the group ownership of your scripts to this group id, and make the scripts run setgid (chmod g+s filename). You can set this up easily if you have administrative priveleges on your computer. buckaduck
In Section
Seekers of Perl Wisdom
|
|