3 class Gitalist::Git::CollectionOfRepositories::Vhost
4 with Gitalist::Git::CollectionOfRepositories {
5 use MooseX::Types::Common::String qw/NonEmptySimpleStr/;
6 use MooseX::Types::Path::Class qw/Dir/;
8 has vhost_dispatch => (
14 _get_collection_name_for_vhost => 'get',
23 _get_collection => 'get',
33 has chosen_collection => (
34 does => 'Gitalist::Git::CollectionOfRepositories',
41 $self->_get_collection($self->_get_collection_name_for_vhost($self->vhost) || $self->_get_collection_name_for_vhost('default'));
51 Gitalist::Git::CollectionOfRepositories::Vhost
55 my $repo = Gitalist::Git::CollectionOfRepositories::Vhost->new(
57 "git.shadowcat.co.uk" => "foo",
58 "git.moose.perl.org" => "bar",
61 foo => Gitalist::Git::CollectionOfRepositories::XXX->new(),
62 bar => Gitalist::Git::CollectionOfRepositories::XXX->new,
65 my $repository_list = $repo->repositories;
66 my $first_repository = $repository_list->[0];
67 my $named_repository = $repo->get_repository('Gitalist');
73 L<Gitalist::Git::CollectionOfRepositories>, L<Gitalist::Git::Repository>
77 See L<Gitalist> for authors.
81 See L<Gitalist> for the license.