[Padre-dev] standard padre::config usage
Jerome Quelin
jquelin at gmail.com
Thu Mar 12 10:09:19 PDT 2009
hi there,
i'm currently cleaning the config subsystem. it's just a cleaning, not a
rewrite, so i'm retaining the grand principles that alias set.
what i've done:
- creating padre::config::constants to host all constants
- removing subs default_* from padre::config. those are constants, and
thus deported to padre::config::constants
- cleaned up padre::config, padre::config::host and padre::config::human
to have public / private subs, comments and pod documentation
padre::config::constants allows to break the circular dependency between
padre::config and other modules.
this is where i am now. note that if you remove your .padre/config.yml,
the new codebase solves the statusbar / syntax check / etc. visibility.
now, i'm pondering making a change to replace the config usage from:
use Padre::Config;
[...]
Padre::Config->main_statusbar;
to:
use Padre::Config qw{ $config };
[...]
$config->main_statusbar;
(main_statusbar is just an example setting here)
ie, change from class method to instance method. since alias declare
$SINGLETON in padre::config with "our", i guess he meant to export it
later on...
of course, i would still retain the possibility to use class methods.
but i'm proposing to make the change in all padre's codebase.
==> please comment & react
jérôme
--
jquelin at gmail.com
More information about the Padre-dev
mailing list