]> git.vpit.fr Git - perl/modules/rgit.git/blob - lib/App/Rgit/Config.pm
20ef2234d77f0c58b00ea268cc4f71776b619079
[perl/modules/rgit.git] / lib / App / Rgit / Config.pm
1 package App::Rgit::Config;
2
3 use strict;
4 use warnings;
5
6 use Carp qw/croak/;
7
8 use Object::Tiny qw/root git/;
9
10 use App::Rgit::Utils qw/validate/;
11
12 =head1 NAME
13
14 App::Rgit::Config - Base class for App::Rgit configurations.
15
16 =head1 VERSION
17
18 Version 0.01
19
20 =head1 DESCRIPTION
21
22 Base class for L<App::Rgit> configurations.
23
24 This is an internal class to L<rgit>.
25
26 =head1 METHODS
27
28 =head2 C<< new root => $root, git => $git >>
29
30 Creates a new configuration object based on the root directory C<$root> and using C<$git> as F<git> executable.
31
32 =cut
33
34 sub new {
35  my ($class, %args) = &validate;
36  my $conf = 'App::Rgit::Config::Default';
37  eval "require $conf; 1" or croak "Couldn't load $conf: $@";
38  $conf->SUPER::new(
39   root => $args{root},
40   git  => $args{git},
41  );
42 }
43
44 =head2 C<root>
45
46 =head2 C<git>
47
48 =head2 C<repos>
49
50 Accessors.
51
52 =head1 SEE ALSO
53
54 L<rgit>.
55
56 =head1 AUTHOR
57
58 Vincent Pit, C<< <perl at profvince.com> >>, L<http://profvince.com>.
59    
60 You can contact me by mail or on C<irc.perl.org> (vincent).
61
62 =head1 BUGS
63
64 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.
65
66 =head1 SUPPORT
67
68 You can find documentation for this module with the perldoc command.
69
70     perldoc App::Rgit::Config
71
72 =head1 COPYRIGHT & LICENSE
73
74 Copyright 2008 Vincent Pit, all rights reserved.
75
76 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
77
78 =cut
79
80 1; # End of App::Rgit::Config