From: Vincent Pit Date: Fri, 23 Aug 2013 21:18:09 +0000 (-0300) Subject: Make sure the POD headings are linkable X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Frgit.git;a=commitdiff_plain;h=e833c52a64e7aac9c18d7051285bf4d9906c4faf;hp=c39af12272015e8aff09d3c05e4f32d7943b4154 Make sure the POD headings are linkable --- diff --git a/lib/App/Rgit.pm b/lib/App/Rgit.pm index 6b43f16..f0bbdde 100644 --- a/lib/App/Rgit.pm +++ b/lib/App/Rgit.pm @@ -26,7 +26,14 @@ This is an internal class to L. =head1 METHODS -=head2 C<< new root => $root, git => $git, cmd => $cmd, args => \@args >> +=head2 C + + my $ar = App::Rgit->new( + root => $root, + git => $git, + cmd => $cmd, + args => \@args, + ); Creates a new L object that's bound to execute the command C<$cmd> on all the C repositories inside C<$root> with C<@args> as arguments and C<$git> as C executable. diff --git a/lib/App/Rgit/Command.pm b/lib/App/Rgit/Command.pm index 5edd9c2..b4d78dd 100644 --- a/lib/App/Rgit/Command.pm +++ b/lib/App/Rgit/Command.pm @@ -27,7 +27,12 @@ This is an internal class to L. =head1 METHODS -=head2 C<< new cmd => $cmd, args => \@args >> +=head2 C + + my $arc = App::Rgit::Command->new( + cmd => $cmd, + args => \@args, + ); Creates a new command object for C<$cmd> that is bound to be called with arguments C<@args>. @@ -63,7 +68,10 @@ sub new { }, $class; } -=head2 C<< action $cmd [ => $pkg ] >> +=head2 C + + my $pkg = $arc->action($cmd); + $arc->action($cmd => $pkg); If C<$pkg> is supplied, handles command C<$cmd> with C<$pkg> objects. Otherwise, returns the current class for C<$cmd>. @@ -84,7 +92,9 @@ sub action { $commands{$cmd} = $pkg; } -=head2 C +=head2 C + + my $code = $arc->report($conf, $repo, $status); Reports that the execution of the command in C<$repo> exited with C<$status> to the current command's policy. Returns what policy C method returned, which should be one of the policy codes listed in C. @@ -113,7 +123,9 @@ BEGIN { eval "sub $_ { \$_[0]->{$_} }" for qw/cmd args policy/; } -=head2 C +=head2 C + + my $code = $arc->run($conf); Runs the command with a L configuration object. Handles back the code to return to the system and the last policy. diff --git a/lib/App/Rgit/Config.pm b/lib/App/Rgit/Config.pm index 29ebd7b..c384203 100644 --- a/lib/App/Rgit/Config.pm +++ b/lib/App/Rgit/Config.pm @@ -32,7 +32,12 @@ This is an internal class to L. =head1 METHODS -=head2 C<< new root => $root, git => $git >> +=head2 C + + my $arc = App::Rgit::Config->new( + root => $root, + git => $git, + ); Creates a new configuration object based on the root directory C<$root> and using C<$git> as F executable. @@ -90,13 +95,21 @@ sub new { }, $conf; } -=head2 C +=head2 C + + $arr->info($msg); + +=head2 C + + $arr->warn($msg); + +=head2 C -=head2 C + $arr->err($msg); -=head2 C +=head2 C -=head2 C + $arr->crit($msg); Notifies a message C<$msg> of the corresponding level. diff --git a/lib/App/Rgit/Guard.pm b/lib/App/Rgit/Guard.pm index 6bcd078..97408ad 100644 --- a/lib/App/Rgit/Guard.pm +++ b/lib/App/Rgit/Guard.pm @@ -23,7 +23,9 @@ This is an internal module to L. =head1 METHODS -=head2 C +=head2 C + + my $guard = App::Rgit::Guard->new($callback); Creates a new C object that will call C<$callback> when it is destroyed. diff --git a/lib/App/Rgit/Policy.pm b/lib/App/Rgit/Policy.pm index d481417..1af0cad 100644 --- a/lib/App/Rgit/Policy.pm +++ b/lib/App/Rgit/Policy.pm @@ -23,7 +23,9 @@ This is an internal class to L. =head1 METHODS -=head2 C<< new policy => $policy >> +=head2 C + + my $arp = App::Rgit::Policy->new(policy => $policy); Creates a new policy object of type C<$policy> by requiring and redispatching the method call to the module named C<$policy> if it contains C<'::'> or to C otherwise. The class represented by C<$policy> must inherit this class. @@ -47,7 +49,9 @@ sub new { bless { }, $class; } -=head2 C +=head2 C + + my $code = $arp->handle($cmd, $config, $repo, $status, $signal); Make the policy handle the end of execution of the L object C<$cmd> with L configuration C<$config> in the L repository C<$repo> that exited with status C<$status> and maybe received signal C<$sigal>. diff --git a/lib/App/Rgit/Repository.pm b/lib/App/Rgit/Repository.pm index fbf3f86..f1dc149 100644 --- a/lib/App/Rgit/Repository.pm +++ b/lib/App/Rgit/Repository.pm @@ -42,7 +42,12 @@ This is an internal class to L. =head1 METHODS -=head2 C<< new dir => $dir [, fake => 1 ] >> +=head2 C + + my $arr = App::Rgit::Repository->new( + dir => $dir, + fake => $bool, + ); Creates a new repository starting from C<$dir>. If the C option is passed, C<$dir> isn't checked to be a valid C repository. @@ -116,7 +121,9 @@ sub chdir { return 1; } -=head2 C +=head2 C + + my $code = $arr->run($conf, @args); Runs C on the repository for the L configuration C<$conf>. When the repository isn't fake, the format substitutions applies to C<@args> elements. diff --git a/lib/App/Rgit/Utils.pm b/lib/App/Rgit/Utils.pm index c081d9b..ee1fdd3 100644 --- a/lib/App/Rgit/Utils.pm +++ b/lib/App/Rgit/Utils.pm @@ -26,7 +26,9 @@ This is an internal module to L. =head1 FUNCTIONS -=head2 C +=head2 C + + my $absolute_path = abs_path($path); Forcefully make a path C<$path> absolute (in L's meaning of the term) when it isn't already absolute or when it contains C<'..'>. @@ -49,7 +51,13 @@ sub abs_path { =head1 CONSTANTS -=head2 C, C, C, C +=head2 C + +=head2 C + +=head2 C + +=head2 C Codes to return from the C callback to respectively proceed to the next repository, retry the current one, end it all, and save the return code. @@ -62,7 +70,15 @@ use constant { LAST => 0x8, }; -=head2 C, C, C, C and C +=head2 C + +=head2 C + +=head2 C + +=head2 C + +=head2 C Message levels.