Krang::Upgrade - superclass for Krang upgrade modules
use Krang::ClassLoader base => 'Upgrade';
This module is intended to be used as a parent class for Krang upgrade
modules. It implements a harness for calling the per_installation()
and per_instance() methods.
To use this module, there are three things you have to do:
upgrade()
method which calls per_installation(), and then calls
per_instance() once for each instance.
per_installation()per_instance() method is called.
This method is called (as an object method) by the inherited upgrade() method.
per_instance()per_installation()
method is called.
This method is called (as an object method) by the inherited upgrade() method.
new()new() method is a constructor which creates a trivial object from a
hash. Your upgrade modules may use this to store state information.
upgrade()upgrade() method is called by the krang_upgrade script to implement
an upgrade. This method calls per_installation(), and then calls
per_instance() once for each installed instance.
The following named parameters may be passed which will then get passed
along to per_installation() and per_instance().
remove_files()per_installation() method since files
are per-installation. File names are given relative to KRANG_ROOT.
$self->remove_files(
'lib/Krang/Foo.pm',
'src/Foo-1.00.tar.gz',
);
Releasing Krang: Creating Upgrade Modules docs/release.pod