http://www.perlmonks.org?node_id=323485


in reply to Reference to a sub return / Config::General

As has been mentioned you can happily submit a patch to the author to make the module return a reference to a hash, rather than the hash. If you think it's worth while, then perhaps other people will, and your patch will be a welcome addition.

You could also look at the plethora of other configuration file reading programs out there. There is no shortage, Apache style, Windows .ini style, XML or YAML format and dirt simple style. I'm sure you will find that some of them return their configuration data in hashref format.

... and more. There are plenty to choose from. Some I know for a fact return their configuration as hasrefs.

HTH, and Good Luck!


--
ajt
  • Comment on Re: Reference to a sub return / Config::General

Replies are listed 'Best First'.
Re: Re: Reference to a sub return / Config::General
by Oberon (Monk) on Jan 23, 2004 at 16:11 UTC
    > ... you can happily submit a patch to the author to make the module return a reference to a hash, rather than the hash.

    Well, that's true. Not sure I care that much; I just wanted to know if I was missing something here, and it appears I'm not. So that's good. Although there is another aspect of Config::General I wouldn't mind improving, so if I get around to submitting a patch for that I might throw in the other for free, as it were. <s>

    > You could also look at the plethora of other configuration file reading programs out there.

    Oh, believe me, I've been looking--although you did have one or two new ones on me in that list; thanx for that! But really Config::General is a great choice IMHO. Just that one thing I thought was a bit odd. But I'm over it now. :-)