NAME
Config::Model::Manual::DataMigration - My author was too lazy to write an abstract
VERSION
version 2.017
Introduction
The content of a configuration file may change, not only when user wants to change the configuration content. When the change is imposed (or proposed) by the software, one must strive to make the migration task as easy as possible for the end user.
This migration may be triggered for several reasons:
Software evolve and new parameters are introduced with new functionalities
Or some functionalities are removed and the corresponding parameters becomes obsolete
Or the original parameter name was confuding and had to be changed
Which holds true for configuration values.
Config::Model proposes some ways to setup a model to facilitate configuration migrations.
This page will show the most common cases. Let the author know about the not so commons cases...
Leaf changes
Simple value change
For instance, if the foo
parameter value must be changed from bien
or mauvais
to good
or bad
and disallow anything else.
foo => {
type => leaf,
value_type => 'enum',
choice => [ qw/good bad/ ],
replace => {
bon => 'good',
mauvais => 'bad'
}
}
Name change
One difficulty about value change is to decide, when reading a file, if the value is the old value or the new ones.
Split parameter
Array changes
SEE ALSO
AUTHOR
Copyright 2012 Dominique Dumont ( ddumont at cpan.org )