=head1 METHODS
-=head2 C<< new category => $category, name => $name [, version => $version, range => $range, ebuild => $ebuild ] >>
+=head2 C<new>
+
+ # 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<CPANPLUS::Dist::Gentoo::Atom> object from the supplied C<$category>, C<$name>, C<$version>, C<$range> and C<$ebuild>.
}, $class;
}
-=head2 C<new_from_ebuild $ebuild>
+=head2 C<new_from_ebuild>
+
+ my $cdga = CPANPLUS::Dist::Gentoo::Atom->new_from_ebuild($ebuild);
Creates a new L<CPANPLUS::Dist::Gentoo::Atom> object by inferring the category, name and version from the given C<$ebuild>
'>' => 2,
);
-=head2 C<and @atoms>
+=head2 C<and>
+
+ 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.
}
}
-=head2 C<fold @atoms>
+=head2 C<fold>
+
+ 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.