Hi Ovid and thanks for your input. Le 20 mars 2012 12:21, Ovid <[email protected]> a écrit : [...] > Basically, the config hash becomes a read-only collection of objects and if > you misspell a hash key (method name), you get a sensible error message and > a list of the available methods. > > Obviously this only works if the config can be represented as a hashref. If > you have config keys which cannot be methods, such as "--foo" or something, > you can still reach inside the object $config->{"--foo"}. Note that chaining > hash keys works, too ($config->auth->password). > > Would this be a reasonable feature for Dancer's config? If an only if the > top level config is a hashref, it's blessed as a "Dancer::Config::Object". > It should be transparent for the end-user, yes?
Looks to be a very handy feature to have, indeed. Maybe we should provide that if the user's config request it? Like set strict_config => 1; _______________________________________________ Dancer-users mailing list [email protected] http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
