1 package CPANPLUS::Dist::Gentoo::Maps;
8 CPANPLUS::Dist::Gentoo::Maps - Map CPAN objects to Gentoo and vice versa.
16 our $VERSION = '0.05';
20 This is an helper package to L<CPANPLUS::Dist::Gentoo>.
26 /^\s*([\w-]+)\s+([\w-]+)\s*$/ and $gentooisms{$1} = $2 while <DATA>;
32 =head2 C<name_c2g $name>
34 Maps a CPAN distribution name to its Gentoo counterpart.
40 return $gentooisms{$name} || $name;
43 =head2 C<version_c2g $version>
45 Converts a CPAN version to a Gentoo version.
57 $v =~ s/([._])[._]*/$1/g;
59 ($v, my $patch, my @rest) = split /_/, $v;
60 $v .= '_p' . $patch if defined $patch;
61 $v .= join('.', '', @rest) if @rest;
66 =head2 C<version_gcmp $va, $vb>
68 Compares two Gentoo versions.
73 my ($a, $b) = map { defined() ? $_ : 0 } @_;
78 if (/^([\d.]*\d)\.*(?:_p\.*(\d[\d.]*))?\.*(?:-r(\d+))?$/) {
80 v => [ split /\.+/, $1 ],
81 p => [ split /\.+/, $2 || 0 ],
86 Carp::croak("Couldn't parse version string '$_'");
90 for my $k (qw/v p r/) {
93 while (@$xa or @$xb) {
94 my $na = shift(@$xa) || 0;
95 my $nb = shift(@$xb) || 0;
106 L<CPANPLUS::Dist::Gentoo>.
110 Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>.
112 You can contact me by mail or on C<irc.perl.org> (vincent).
116 Please report any bugs or feature requests to C<bug-cpanplus-dist-gentoo at rt.cpan.org>, or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CPANPLUS-Dist-Gentoo>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
120 You can find documentation for this module with the perldoc command.
122 perldoc CPANPLUS::Dist::Gentoo
124 =head1 COPYRIGHT & LICENSE
126 Copyright 2009 Vincent Pit, all rights reserved.
128 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
132 1; # End of CPANPLUS::Dist::Gentoo::Maps
135 ANSIColor Term-ANSIColor
136 Audio-CD Audio-CD-disc-cover
137 CGI-Simple Cgi-Simple
138 Cache-Mmap cache-mmap
139 Class-Loader class-loader
140 Class-ReturnValue class-returnvalue
141 Config-General config-general
142 Convert-ASCII-Armour convert-ascii-armour
143 Convert-PEM convert-pem
145 Crypt-DES_EDE3 crypt-des-ede3
148 Crypt-IDEA crypt-idea
149 Crypt-Primes crypt-primes
151 Crypt-Random crypt-random
152 DBIx-SearchBuilder dbix-searchbuilder
153 Data-Buffer data-buffer
155 Digest-BubbleBabble digest-bubblebabble
156 Digest-MD2 digest-md2
157 ExtUtils-Depends extutils-depends
158 ExtUtils-PkgConfig extutils-pkgconfig
159 Frontier-RPC frontier-rpc
162 Gnome2-Canvas gnome2-canvas
163 Gnome2-GConf gnome2-gconf
164 Gnome2-Print gnome2-print
165 Gnome2-VFS gnome2-vfs-perl
166 Gnome2-Wnck gnome2-wnck
168 Gtk2-Ex-FormFactory gtk2-ex-formfactory
169 Gtk2-GladeXML gtk2-gladexml
170 Gtk2-Spell gtk2-spell
171 Gtk2-TrayIcon gtk2-trayicon
172 Gtk2-TrayManager gtk2-traymanager
174 I18N-LangTags i18n-langtags
177 Inline-Files inline-files
178 Locale-Maketext locale-maketext
179 Locale-Maketext-Fuzzy locale-maketext-fuzzy
180 Locale-Maketext-Lexicon locale-maketext-lexicon
181 Log-Dispatch log-dispatch
183 Module-Info module-info
186 Net-SSH-Perl net-ssh-perl
187 Net-Server net-server
188 OLE-Storage_Lite OLE-StorageLite
189 Ogg-Vorbis-Header ogg-vorbis-header
192 Regexp-Common regexp-common
194 Set-Scalar set-scalar
195 String-CRC32 string-crc32
196 Text-Autoformat text-autoformat
197 Text-Reform text-reform
198 Text-Template text-template
199 Text-Wrapper text-wrapper
200 Tie-EncryptedHash tie-encryptedhash
204 gettext Locale-gettext