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)
In reply to Re: Reference to a sub return / Config::General
by jeffa
in thread Reference to a sub return / Config::General
by Oberon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |