Gentoo::Overlay::Package - Class for Package's in Gentoo Overlays
version 2.001002
my $package = Overlay::Package->new( name => 'Moose', category => $category_object, ); $package->exists() # Moose exists print $package->pretty_name() # dev-perl/Moose::gentoo print $package->path() # /usr/portage/dev-perl/Moose ::Package->is_blacklisted("..") # '..' is not a valid package name ::Package->is_blacklisted('metadata.xml') # is not a valid directory
Does the Package exist, and is it a directory?
$package->exists();
Does the package name appear on a blacklist meaning auto-scan should ignore this?
::Package->is_blacklisted('..') # true
A pretty form of the name
$package->pretty_name # dev-perl/Moose::gentoo
$overlay->iterate( $what, sub { my ( $context_information ) = shift; } );
The iterate method provides a handy way to do walking across the whole tree stopping at each of a given type.
$what = 'ebuilds'
$overlay->iterate( ebuilds => sub { my ( $self, $c ) = shift; # $c->{ebuild_name} # String # $c->{ebuild} # Ebuild Object # $c->{num_ebuilds} # How many ebuild are there to iterate # $c->{last_ebuild} # Index ID of the last ebuild. # $c->{ebuild_num} # Index ID of the current ebuild. } );
The packages Short name.
isa => Gentoo__Overlay_PackageName, required, ro
PackageName
The category object that this package is in.
isa => Gentoo__Overlay_Category, required, ro accessors => overlay
Category
"overlay"
The full path to the package.
isa => Dir, lazy, ro
"Dir" in MooseX::Types::Path::Tiny
$package->overlay -> Gentoo::Overlay::Category->overlay
"overlay" in Gentoo::Overlay::Category
"category"
for( $package->ebuild_names ){ print $_; }
"_ebuilds"
my %ebuilds = $package->ebuilds;
my $ebuild = $package->get_ebuild('Moose-2.0.0.ebuild');
isa => HashRef[ Gentoo__Overlay_Ebuild ], lazy_build, ro accessors => _has_ebuild , ebuild_names, ebuilds, get_ebuild
"_has_ebuild"
"ebuild_names"
"ebuilds"
"get_ebuild"
$package->_has_ebuild('Moose-2.0.0.ebuild');
Class-Wide list of blacklisted package names.
isa => HashRef[ Str ], ro, lazy, accessors => _scan_blacklisted
"_scan_blacklisted"
MooseX::Types::Moose
is $arg blacklisted in the Class Wide Blacklist?
$arg
::Package->_scan_blacklisted( $arg ) -> exists ::Package->_scan_blacklist->{$arg}
"_scan_blacklist"
Generates the ebuild Hash-Table, by scanning the package directory.
"_packages"
$object->_iterate_ebuilds( ignored_value => sub { } );
Handles dispatch call for
$object->iterate( ebuilds => sub { } );
Kent Fredric <kentnl@cpan.org>
This software is copyright (c) 2017 by Kent Fredric <kentnl@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Gentoo::Overlay, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Gentoo::Overlay
CPAN shell
perl -MCPAN -e shell install Gentoo::Overlay
For more information on module installation, please visit the detailed CPAN module installation guide.