From: Vincent Pit Date: Fri, 23 Aug 2013 17:38:01 +0000 (-0300) Subject: Make sure the POD headings are linkable X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=19eae8789c3ed2068bfde084ba9a8c711526c589;p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git Make sure the POD headings are linkable --- diff --git a/lib/CPANPLUS/Dist/Gentoo/Atom.pm b/lib/CPANPLUS/Dist/Gentoo/Atom.pm index 7a3acbb..eef7cff 100644 --- a/lib/CPANPLUS/Dist/Gentoo/Atom.pm +++ b/lib/CPANPLUS/Dist/Gentoo/Atom.pm @@ -39,7 +39,24 @@ my $version_rx = $CPANPLUS::Dist::Gentoo::Version::version_rx; =head1 METHODS -=head2 C<< new category => $category, name => $name [, version => $version, range => $range, ebuild => $ebuild ] >> +=head2 C + + # Infer everything from $atom : + my $cdga = CPANPLUS::Dist::Gentoo::Atom->new( + atom => $atom, + # Optional : + ebuild => $ebuild, + ); + + # Or specify the attributes manually : + my $cdga = CPANPLUS::Dist::Gentoo::Atom->new( + category => $category, + name => $name, + version => $version, + range => $range, + # Optional : + ebuild => $ebuild, + ); Creates a new L object from the supplied C<$category>, C<$name>, C<$version>, C<$range> and C<$ebuild>. @@ -93,7 +110,9 @@ sub new { }, $class; } -=head2 C +=head2 C + + my $cdga = CPANPLUS::Dist::Gentoo::Atom->new_from_ebuild($ebuild); Creates a new L object by inferring the category, name and version from the given C<$ebuild> @@ -228,7 +247,9 @@ my %order = ( '>' => 2, ); -=head2 C +=head2 C + + my $cdga = CPANPLUS::Dist::Gentoo::Atom->and(@atoms); Compute the ranged atom representing the logical AND between C<@atoms> with the same category and name. @@ -278,7 +299,9 @@ sub and { } } -=head2 C +=head2 C + + my @folded = CPANPLUS::Dist::Gentoo::Atom->fold(@atoms); Returns a list built from C<@atoms> but where there's only one atom for a given category and name. diff --git a/lib/CPANPLUS/Dist/Gentoo/Guard.pm b/lib/CPANPLUS/Dist/Gentoo/Guard.pm index 6ba511d..59567cd 100644 --- a/lib/CPANPLUS/Dist/Gentoo/Guard.pm +++ b/lib/CPANPLUS/Dist/Gentoo/Guard.pm @@ -21,7 +21,9 @@ This is a scope guard object helper for L. =head1 METHODS -=head2 C +=head2 C + + my $guard = CPANPLUS::Dist::Gentoo::Guard->new($coderef); Creates a new L object that will call C<$coderef> when destroyed. diff --git a/lib/CPANPLUS/Dist/Gentoo/Maps.pm b/lib/CPANPLUS/Dist/Gentoo/Maps.pm index 84ede04..7ba1e94 100644 --- a/lib/CPANPLUS/Dist/Gentoo/Maps.pm +++ b/lib/CPANPLUS/Dist/Gentoo/Maps.pm @@ -32,7 +32,9 @@ close DATA; =head1 FUNCTIONS -=head2 C +=head2 C + + my $gentoo_pkg = name_c2g($cpan_dist); Maps a CPAN distribution name to the corresponding Gentoo package name. @@ -43,7 +45,9 @@ sub name_c2g { return $name_mismatch{$name} || $name; } -=head2 C +=head2 C + + my @gentoo_licenses = license_c2g(@meta_licenses); Maps F C tag values to the corresponding list of Gentoo license identifiers. Duplicates are stripped off. @@ -77,7 +81,9 @@ sub license_c2g { @_; } -=head2 C +=head2 C + + my $gentoo_version = version_c2g($cpan_dist, $cpan_version); Converts the C<$version> of a CPAN distribution C<$name> to a Gentoo version number. @@ -287,7 +293,9 @@ sub version_c2g { return $handler->($v); } -=head2 C +=head2 C + + my $gentoo_version = perl_version_c2g($perl_version); Converts a perl version number as you can find it in CPAN prerequisites to a Gentoo version number. @@ -312,7 +320,9 @@ sub perl_version_c2g { return join '.', map int, @parts; } -=head2 C +=head2 C + + my $timestamp = get_portage_timestamp($portage); Get the numerical timestamp associated with the portage tree located at C<$portage>. Requires L, and returns C if it is not available. diff --git a/lib/CPANPLUS/Dist/Gentoo/Version.pm b/lib/CPANPLUS/Dist/Gentoo/Version.pm index cb2b98b..cc21274 100644 --- a/lib/CPANPLUS/Dist/Gentoo/Version.pm +++ b/lib/CPANPLUS/Dist/Gentoo/Version.pm @@ -50,7 +50,9 @@ my $capturing_version_rx = qr{ =head1 METHODS -=head2 C +=head2 C + + my $cdgv = CPANPLUS::Dist::Gentoo::Version->new($vstring); Creates a new L object from the version string C<$vstring>.