in reply to Module Readonly
if is then really easy to read the values inKEY=VALUE KEY=VALUE ...
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.open(F,"config.conf"); my %config = {}' while(<F>) { (my $key,$value) = split /=/; $config{"$key"} = $value; } close(F)
|
|---|