[Padre-dev] Padre::FirstTime::Vendor
Gabor Szabo
szabgab at gmail.com
Mon Feb 15 22:48:35 PST 2010
Hi,
Adam Kennedy and I have long discussed on IRC that we need some way
to allow downstream distributors of Padre (e.g. Strawberry Perl) to make
some configuration the first time Padre runs.
Today we had this chat on IRC again so here a sketch:
There are two cases of first run of Padre
1) very first run
2) upgrade of Padre
We might want to address both issues in the same place.
We could have a module Padre::FirstTime that is loaded
1) if .padre did not exist
2) if the current version of Padre is different from version number
recored in config.yml (I think it is not there yet, we will need to
add it).
When Padre::FirstTime is loaded it searches @INC for any module in the
Padre::FirstTime::* name space. Loads them and calls one of the following
methods
Padre::FirstTime::*->first_time
Padre::FirstTime::*->upgrade
There might be several packages under Padre::FirstTime::*, the order
of calling is random thought we could actually make them be stacked on
each other by makig then inherit from each other. e.g.
Padre::FirstTime::Ubuntu isa Padre::FirstTime::Debian
The above modules are not loaded if it neither a new installation nor
an upgrade.
what do you think?
regards
Gabor
More information about the Padre-dev
mailing list