1 package DBIx::Class::DeploymentHandler::HandlesVersioning;
4 # note: the sets returned need to match!
5 requires 'next_version_set';
6 requires 'previous_version_set';
12 =method next_version_set
14 print 'versions to install: ';
15 while (my $vs = $dh->next_version_set) {
16 print join q(, ), @{$vs}
20 return an arrayref describing each version that needs to be
21 installed to upgrade to C<< $dh->to_version >>.
23 =method previous_version_set
25 print 'versions to uninstall: ';
26 while (my $vs = $dh->previous_version_set) {
27 print join q(, ), @{$vs}
31 return an arrayref describing each version that needs to be
32 "installed" to downgrade to C<< $dh->to_version >>.
34 # normally a VersionHandler will take
35 # a to_version and yeild an iterator of
36 # "version sets" or something like that.
38 # A "version set" is basically an arrayref
39 # of "version numbers" (which we already know
40 # is vague as is.) Typically an call to a
41 # VH w/ a db version of 1 and a "to_version"
42 # of 5 will iterate over something like this:
48 # Of course rob wants to be able to have dep
49 # management with his versions, so I *think* his
50 # would work like this:
52 # to_version = 7, db_version = 1
57 # Because 7 depended on 5, 5 was installed first;
58 # note that this potentially never released module
59 # doesn't use version pairs, instead it just yeilds
60 # versions. Version pairs are too much work for users
61 # to have to deal with in that sitation. We may
62 # actually switch to this for other versioners.
64 # The upshot of all this is that the DeploymentMethod
65 # needs to be able to take an ArrayRef[VersionNumber],
66 # instead of just a pair of VersionNumber.
67 vim: ts=2 sw=2 expandtab