X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FApp%2FRgit%2FPolicy%2FInteractive.pm;h=5b1a63d75ea0a8b23e422affbc4a2804d118b64a;hb=80656eec9bd2400f8db71d0d10d7d0be54139667;hp=de251b3c6bc1c062c7cc31bdad68f7aa7974d81f;hpb=dc668e3c302569ed2b5eb2ed893247308f22528a;p=perl%2Fmodules%2Frgit.git diff --git a/lib/App/Rgit/Policy/Interactive.pm b/lib/App/Rgit/Policy/Interactive.pm index de251b3..5b1a63d 100644 --- a/lib/App/Rgit/Policy/Interactive.pm +++ b/lib/App/Rgit/Policy/Interactive.pm @@ -5,9 +5,9 @@ use warnings; use Cwd (); -use App::Rgit::Utils qw/:codes/; +use App::Rgit::Utils qw<:codes>; -use base qw/App::Rgit::Policy/; +use base qw; =head1 NAME @@ -15,11 +15,28 @@ App::Rgit::Policy::Interactive - A policy that asks what to do on error. =head1 VERSION -Version 0.06 +Version 0.08 =cut -our $VERSION = '0.06'; +our $VERSION = '0.08'; + +=head1 DESCRIPTION + +When a run exited with non-zero status, this policy asks the user whether he wants to ignore and continue with the next repository, ignore all future possible errors, retry this run or open a shell in the current repository. +In this last case, the user will be asked again what to do when he will close the shell. + +=head1 METHODS + +This class inherits from L. + +It implements : + +=head2 C + +The constructor will die if L can't be loaded. + +=cut my ($int_code, $shell); @@ -46,6 +63,10 @@ sub new { $class->SUPER::new(@_); } +=head2 C + +=cut + my %codes = ( 'a' => [ LAST, 'aborting' ], 'i' => [ NEXT, 'ignoring' ], @@ -53,7 +74,7 @@ my %codes = ( 'r' => [ REDO, 'retrying' ], ); -sub report { +sub handle { my ($policy, $cmd, $conf, $repo, $status, $signal) = @_; return NEXT unless $status; @@ -94,10 +115,14 @@ sub report { L. +L. + +L. + =head1 AUTHOR Vincent Pit, C<< >>, L. - + You can contact me by mail or on C (vincent). =head1 BUGS