]> git.vpit.fr Git - perl/modules/rgit.git/blob - lib/App/Rgit/Config/Default.pm
Remove trailing whitespace
[perl/modules/rgit.git] / lib / App / Rgit / Config / Default.pm
1 package App::Rgit::Config::Default;
2
3 use strict;
4 use warnings;
5
6 use File::Find qw/find/;
7
8 use base qw/App::Rgit::Config/;
9
10 use App::Rgit::Repository;
11
12 =head1 NAME
13
14 App::Rgit::Config::Default - Default App::Rgit configuration class.
15
16 =head1 VERSION
17
18 Version 0.06
19
20 =cut
21
22 our $VERSION = '0.06';
23
24 =head1 DESCRIPTION
25
26 Default L<App::Rgit> configuration class.
27
28 This is an internal class to L<rgit>.
29
30 =head1 METHODS
31
32 This class inherits from L<App::Rgit::Config>.
33
34 It implements :
35
36 =head2 C<repos>
37
38 =cut
39
40 sub repos {
41  my $self = shift;
42  return $self->{repos} if defined $self->{repos};
43  my %repos;
44  find {
45   wanted => sub {
46    return unless -d $_;
47    my $r = App::Rgit::Repository->new(dir => $File::Find::name);
48    $repos{$r->repo} = $r if $r
49                          and not exists $repos{$r->repo};
50   },
51   follow => 1
52  }, $self->root;
53  $self->{repos} = [ sort { $a->repo cmp $b->repo } values %repos ];
54 }
55
56 =head1 SEE ALSO
57
58 L<rgit>.
59
60 =head1 AUTHOR
61
62 Vincent Pit, C<< <perl at profvince.com> >>, L<http://profvince.com>.
63
64 You can contact me by mail or on C<irc.perl.org> (vincent).
65
66 =head1 BUGS
67
68 Please report any bugs or feature requests to C<bug-rgit at rt.cpan.org>, or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=rgit>.  I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
69
70 =head1 SUPPORT
71
72 You can find documentation for this module with the perldoc command.
73
74     perldoc App::Rgit::Command::Default
75
76 =head1 COPYRIGHT & LICENSE
77
78 Copyright 2008-2009 Vincent Pit, all rights reserved.
79
80 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
81
82 =cut
83
84 1; # End of App::Rgit::Command::Default