]> git.vpit.fr Git - perl/modules/rgit.git/blob - lib/App/Rgit/Policy.pm
Remove trailing whitespace
[perl/modules/rgit.git] / lib / App / Rgit / Policy.pm
1 package App::Rgit::Policy;
2
3 use strict;
4 use warnings;
5
6 =head1 NAME
7
8 App::Rgit::Policy - Base class for App::Rgit policies.
9
10 =head1 VERSION
11
12 Version 0.06
13
14 =cut
15
16 our $VERSION = '0.06';
17
18 sub new {
19  my $class = shift;
20  $class = ref $class || $class;
21
22  my %args = @_;
23
24  if ($class eq __PACKAGE__) {
25   my $policy = delete $args{name};
26   $policy = 'Default' unless defined $policy;
27   $policy = __PACKAGE__ . "::$policy" unless $policy =~ /::/;
28   eval "require $policy" or die $@;
29   return $policy->new(%args);
30  }
31
32  bless { }, $class;
33 }
34
35 =head1 SEE ALSO
36
37 L<rgit>.
38
39 =head1 AUTHOR
40
41 Vincent Pit, C<< <perl at profvince.com> >>, L<http://profvince.com>.
42
43 You can contact me by mail or on C<irc.perl.org> (vincent).
44
45 =head1 BUGS
46
47 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>.
48 I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
49
50 =head1 SUPPORT
51
52 You can find documentation for this module with the perldoc command.
53
54     perldoc App::Rgit::Policy
55
56 =head1 COPYRIGHT & LICENSE
57
58 Copyright 2008,2009,2010 Vincent Pit, all rights reserved.
59
60 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
61
62 =cut
63
64 1; # End of App::Rgit::Policy