in reply to Reference to a sub return / Config::General
Config::General was designed to take a text file, parse it, and return the results in a hash. You could patch the code to return a hash reference instead, but if your config file is gigantic in the first place, then maybe you are designing something wrong. Most config files i work with never make into the megabyte range (or even over 100K for that matter).
Regardless of whether you use:
ormy $config = { Config::General->new('my.conf')->getall() };
some copying will need to be performed. Don't worry about size unless you have to, and it sounds like you really don't.my %config = Config::General->new('my.conf')->getall(); my $config = \%config;
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Reference to a sub return / Config::General
by Oberon (Monk) on Jan 22, 2004 at 22:33 UTC | |
by revdiablo (Prior) on Jan 22, 2004 at 22:58 UTC | |
by Oberon (Monk) on Jan 23, 2004 at 16:05 UTC | |
by revdiablo (Prior) on Jan 24, 2004 at 05:49 UTC |