1 package App::Rgit::Config;
8 use File::Spec::Functions qw/file_name_is_absolute/;
10 use Object::Tiny qw/root git/;
12 use App::Rgit::Utils qw/validate/;
16 App::Rgit::Config - Base class for App::Rgit configurations.
24 our $VERSION = '0.02';
28 Base class for L<App::Rgit> configurations.
30 This is an internal class to L<rgit>.
34 =head2 C<< new root => $root, git => $git >>
36 Creates a new configuration object based on the root directory C<$root> and using C<$git> as F<git> executable.
41 my ($class, %args) = &validate;
42 my $root = $args{root};
43 return unless defined $root and -d $root;
44 $root = abs_path $root unless file_name_is_absolute $root;
45 return unless defined $args{git} and -x $args{git};
46 my $conf = 'App::Rgit::Config::Default';
47 eval "require $conf; 1" or croak "Couldn't load $conf: $@";
68 Vincent Pit, C<< <perl at profvince.com> >>, L<http://profvince.com>.
70 You can contact me by mail or on C<irc.perl.org> (vincent).
74 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.
78 You can find documentation for this module with the perldoc command.
80 perldoc App::Rgit::Config
82 =head1 COPYRIGHT & LICENSE
84 Copyright 2008 Vincent Pit, all rights reserved.
86 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
90 1; # End of App::Rgit::Config