in reply to Module Readonly

I am by no means a perl wizard, but I have run into this problem many times. My solution is to stick all my constants into a config file of the format:
KEY=VALUE KEY=VALUE ...
if is then really easy to read the values in
open(F,"config.conf"); my %config = {}' while(<F>) { (my $key,$value) = split /=/; $config{"$key"} = $value; } close(F)
if you stick this in an object and only reference the object through some function ie: $obj->v('KEY'); then it is unlikely the value will get modified, it is always possible they can modify your "constants" through  $Packagename::config{'key'} but good programing style should dictate that this shouldn't happen.


daN.