in reply to Re: Application-wide configuration
in thread Application-wide configuration
If we don't need that, we can also drop no strict 'refs' and just do
use strict; use warnings; package Config::Once; use Config::Auto; our $Config; sub init { my ($class, $config_path) = @_; ... } sub cfg { my ($class, $param) = @_; return $Config->{$param} if (defined $param); return $Config; } 1;
And the ref was reflectory. Most probably not needed.
That's not to the point, though.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Application-wide configuration
by ikegami (Patriarch) on Jul 27, 2007 at 19:04 UTC | |
by akho (Hermit) on Jul 27, 2007 at 19:24 UTC |