DiaColloDB::Upgrade - DiaColloDB utilities: auto-magic upgrades: top level
use DiaColloDB::Upgrade; @packages = $CLASS_OR_OBJECT->available(); @needed = $CLASS_OR_OBJECT->needed($dbdir, \%opts?, @packages); @which = $CLASS_OR_OBJECT->which($dbdir, \%opts?, @packages); $bool = $CLASS_OR_OBJECT->upgrade($dbdir, \%opts?, @packages);
DiaColloDB::Upgrade is a convenience package for performing automatic in-place upgrades to DiaColloDB database directories, used by the dcdb-upgrade.perl script included in the DiaColloDB distribution.
DiaColloDB::Upgrade inherits from DiaColloDB::Logger.
An ARRAY of available automagic upgrade sub-packages (DiaColloDB::Upgrade:: suffixes).
DiaColloDB::Upgrade::
@upgrades = $CLASS_OR_OBJECT->available();
Returns list of available upgrade-packages (DiaColloDB::Upgrade:: suffixes).
@needed = $CLASS_OR_OBJECT->needed($dbdir, \%opts?, @packages);
Returns list of those upgrade-packages in @packages which are applicable to the local DiaColloDB index in $dbdir. %opts are passed to upgrade-package new() methods.
@packages
$dbdir
%opts
@which = $CLASS_OR_OBJECT->which($dbdir, \%opts?);
Returns a list of upgrades previously applied to $dbdir. Returned list is created by parsing "upgraded" field from "$dbdir/header.json". If the upgrade-item "by" keyword is the name of a package inheriting from DiaColloDB::Upgrade::Base, a new object will be created and appended to the returned list; otherwise the parsed HASH-ref is returned as-is. %opts are passed to upgrade-package new() methods.
"upgraded"
"$dbdir/header.json"
"by"
$bool = $CLASS_OR_OBJECT->upgrade($dbdir, \%opts?, \@upgrades_or_pkgs);
Force-applies upgrades in @upgrades to the local DiaColloDB index in $dbdir; %opts are passed to upgrade-package new() methods.
@upgrades
Bryan Jurish <moocow@cpan.org>
Copyright (C) 2016 by Bryan Jurish
This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.2 or, at your option, any later version of Perl 5 you may have available.
dcdb-upgrade.perl(1), DiaColloDB::Upgrade::Base(3pm), DiaColloDB::Upgrade::v0_04_dlimits(3pm), DiaColloDB::Upgrade::v0_09_multimap(3pm), DiaColloDB::Upgrade::v0_10_x2t(3pm), DiaColloDB(3pm), perl(1), ...
To install DiaColloDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DiaColloDB
CPAN shell
perl -MCPAN -e shell install DiaColloDB
For more information on module installation, please visit the detailed CPAN module installation guide.