X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FApp%2FRgit.pm;h=a91f37ea8ae29af4af362e1ecd662ff900fc3dd0;hb=76ba389e3711e8f254aea83f9b3b7b221c0517a8;hp=1d1ee0f1b697089470605ab2a1a3ffb1e21a9612;hpb=4c6f2bc56bc50a662b2c2625bcc012d4757f9abf;p=perl%2Fmodules%2Frgit.git diff --git a/lib/App/Rgit.pm b/lib/App/Rgit.pm index 1d1ee0f..a91f37e 100644 --- a/lib/App/Rgit.pm +++ b/lib/App/Rgit.pm @@ -3,8 +3,6 @@ package App::Rgit; use strict; use warnings; -use Object::Tiny qw/config command/; - use App::Rgit::Command; use App::Rgit::Config; use App::Rgit::Utils qw/validate/; @@ -15,11 +13,11 @@ App::Rgit - Backend that supports the rgit utility. =head1 VERSION -Version 0.02 +Version 0.06 =cut -our $VERSION = '0.02'; +our $VERSION = '0.06'; =head1 DESCRIPTION @@ -38,18 +36,21 @@ Creates a new L object that's bound to execute the command C<$cmd> on sub new { my ($class, %args) = &validate; my $config = App::Rgit::Config->new( - root => $args{root}, - git => $args{git}, + root => $args{root}, + git => $args{git}, + debug => $args{debug}, ); return unless defined $config; - $class->SUPER::new( - config => $config, - command => App::Rgit::Command->new( - cmd => $args{cmd}, - args => $args{args}, - repos => $config->repos, - ) + my $command = App::Rgit::Command->new( + cmd => $args{cmd}, + args => $args{args}, + policy => $args{policy}, ); + return unless defined $command; + bless { + config => $config, + command => $command, + }, $class; } =head2 C @@ -67,7 +68,13 @@ sub run { =head2 C -Accessors. +Read-only accessors. + +=cut + +BEGIN { + eval "sub $_ { \$_[0]->{$_} }" for qw/config command/; +} =head1 SEE ALSO @@ -91,7 +98,7 @@ You can find documentation for this module with the perldoc command. =head1 COPYRIGHT & LICENSE -Copyright 2008 Vincent Pit, all rights reserved. +Copyright 2008-2009 Vincent Pit, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.