[Padre-dev] standard padre::config usage
Adam Kennedy
adamkennedybackup at gmail.com
Sun Mar 15 18:40:15 PDT 2009
Exporting is possibly a bad idea.
While the main config object is a singleton, it's not necessarily the
ONLY config.
Because projects will need to make their own as well.
The singleton only stores the default config.
Adam K
2009/3/13 Jerome Quelin <jquelin at gmail.com>:
> 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
> _______________________________________________
> Padre-dev mailing list
> Padre-dev at perlide.org
> http://mail.perlide.org/mailman/listinfo/padre-dev
>
More information about the Padre-dev
mailing list