X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git;a=blobdiff_plain;f=lib%2FCPANPLUS%2FDist%2FGentoo%2FAtom.pm;h=a560326e6c19636cd43c7ef3b32e9663c307f7f4;hp=bc0e9c027eb57809f817da445e64e92aa2673aeb;hb=2af17f47dcbf67aec8d360943f97b438c20d0429;hpb=bc88694e8076ef23c06a64a23cbbbf1ed3687f08 diff --git a/lib/CPANPLUS/Dist/Gentoo/Atom.pm b/lib/CPANPLUS/Dist/Gentoo/Atom.pm index bc0e9c0..a560326 100644 --- a/lib/CPANPLUS/Dist/Gentoo/Atom.pm +++ b/lib/CPANPLUS/Dist/Gentoo/Atom.pm @@ -9,8 +9,8 @@ use Carp (); use Scalar::Util (); use overload ( - '<=>' => \&cmp, - '""' => \&as_string, + '<=>' => \&_spaceship, + '""' => \&_stringify, ); use CPANPLUS::Dist::Gentoo::Version; @@ -75,7 +75,7 @@ BEGIN { eval "sub $_ { \$_[0]->{$_} }" for qw/category name version range ebuild/; } -sub cmp { +sub _spaceship { my ($a1, $a2, $r) = @_; my $v1 = $a1->version; @@ -94,7 +94,7 @@ sub cmp { return $v1 <=> $v2; } -sub as_string { +sub _stringify { my ($a) = @_; my $atom = $a->category . '/' . $a->name;