X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FCPANPLUS%2FDist%2FGentoo%2FMaps.pm;h=787dc896f92faabc7b611f640150c7f530c83bb0;hb=ace21f357ef35a3f55f75362ed0d991fc83f22e6;hp=b9b96119745a2bcd698ae1ec8813f09701ce8acb;hpb=81b5731129ec4df7c299707f9650bf4a693a8154;p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git diff --git a/lib/CPANPLUS/Dist/Gentoo/Maps.pm b/lib/CPANPLUS/Dist/Gentoo/Maps.pm index b9b9611..787dc89 100644 --- a/lib/CPANPLUS/Dist/Gentoo/Maps.pm +++ b/lib/CPANPLUS/Dist/Gentoo/Maps.pm @@ -5,17 +5,17 @@ use warnings; =head1 NAME -CPANPLUS::Dist::Gentoo::Maps - Map CPAN objects to Gentoo and vice versa. +CPANPLUS::Dist::Gentoo::Maps - Map CPAN distribution names, version numbers and license identifiers to their Gentoo counterparts. =head1 VERSION -Version 0.10 +Version 0.11 =cut -our $VERSION = '0.10'; +our $VERSION = '0.11'; -=head1 DESCRPITON +=head1 DESCRIPTION This is an helper package to L. @@ -31,7 +31,7 @@ close DATA; =head2 C -Maps a CPAN distribution name to its Gentoo counterpart. +Maps a CPAN distribution name to the corresponding Gentoo package name. =cut @@ -42,7 +42,7 @@ sub name_c2g { =head2 C -Maps F C tag values to the corresponding list of Gentoo licenses identifiers. +Maps F C tag values to the corresponding list of Gentoo license identifiers. Duplicates are stripped off. The included data was gathered from L and L. @@ -67,12 +67,16 @@ my %licenses = ( sub license_c2g { my %seen; - grep !$seen{$_}++, map @{$licenses{+lc} || []}, @_; + + grep !$seen{$_}++, + map @{$licenses{+lc} || []}, + grep defined, + @_; } =head2 C -Converts the C<$version> of a CPAN distribution C<$name> to a Gentoo version. +Converts the C<$version> of a CPAN distribution C<$name> to a Gentoo version number. =cut @@ -169,11 +173,11 @@ my $letters_as_suffix = sub { my %version_mismatch; -$version_mismatch{$_} = $insert_dot_at_1 for qw/ +$version_mismatch{$_} = $insert_dot_at_1 for qw< CGI-Simple -/; +>; -$version_mismatch{$_} = $insert_dot_at_all_1 for qw/ +$version_mismatch{$_} = $insert_dot_at_all_1 for qw< AnyEvent Archive-Rar IO-AIO @@ -183,13 +187,13 @@ $version_mismatch{$_} = $insert_dot_at_all_1 for qw/ Tie-Array-Sorted Tk-TableMatrix XML-RSS-Feed -/; +>; -$version_mismatch{$_} = $insert_dot_at_2 for qw/ +$version_mismatch{$_} = $insert_dot_at_2 for qw< Error -/; +>; -$version_mismatch{$_} = $insert_dot_at_all_2 for qw/ +$version_mismatch{$_} = $insert_dot_at_all_2 for qw< Authen-Htpasswd BSD-Resource CDDB @@ -212,35 +216,35 @@ $version_mismatch{$_} = $insert_dot_at_all_2 for qw/ Time-HiRes Time-Local perl-ldap -/; +>; -$version_mismatch{$_} = $insert_dot_at_all_3 for qw/ +$version_mismatch{$_} = $insert_dot_at_all_3 for qw< Parse-RecDescent Return-Value -/; +>; -$version_mismatch{$_} = $pad_decimals_to_2 for qw/ +$version_mismatch{$_} = $pad_decimals_to_2 for qw< Nmap-Parser XML-AutoWriter -/; +>; -$version_mismatch{$_} = $pad_decimals_to_4 for qw/ +$version_mismatch{$_} = $pad_decimals_to_4 for qw< Convert-BER -/; +>; -$version_mismatch{$_} = $correct_suffixes for qw/ +$version_mismatch{$_} = $correct_suffixes for qw< Gimp XML-Grove -/; +>; -$version_mismatch{$_} = $strip_letters for qw/ +$version_mismatch{$_} = $strip_letters for qw< DelimMatch SGMLSpm -/; +>; -$version_mismatch{$_} = $letters_as_suffix for qw/ +$version_mismatch{$_} = $letters_as_suffix for qw< Frontier-RPC -/; +>; sub version_c2g { my ($n, $v) = @_; @@ -256,7 +260,7 @@ sub version_c2g { =head2 C -Converts a perl version as you can find it in prerequisites to a Gentoo version number. +Converts a perl version number as you can find it in CPAN prerequisites to a Gentoo version number. =cut @@ -302,7 +306,7 @@ You can find documentation for this module with the perldoc command. =head1 COPYRIGHT & LICENSE -Copyright 2009,2010 Vincent Pit, all rights reserved. +Copyright 2009,2010,2011 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.