NAME

Gentoo::Overlay::Category - A singular category in a repository;

VERSION

version 0.03000000

SYNOPSIS

Still limited functionality, more to come.

my $category = ::Overlay::Category->new(
    name => 'dev-perl',
    overlay => '/usr/portage' ,
);

my $category = ::Overlay::Category->new(
    name => 'dev-perl',
    overlay => $overlay_object ,
);

$category->exists()  # is the category there, is it a directory?

$category->pretty_name()  #  dev-perl/::gentoo

$category->path()  # /usr/portage/dev-perl

::Overlay::Category->is_blacklisted('..') # is '..' a blacklisted category

METHODS

exists

Does the category exist, and is it a directory?

$category->exists();

is_blacklisted

Does the category name appear on a blacklist meaning auto-scan should ignore this?

::Category->is_blacklisted('..') # true

::Category->is_blacklisted('metadata') # true

pretty_name

A pretty form of the name.

$category->pretty_name  # dev-perl/::gentoo

ATTRIBUTES

name

The classes short name

isa => Gentoo__Overlay_CategoryName, required, ro

CategoryName

overlay

The overlay it is in.

isa => Gentoo__Overlay_Overlay, required, coerce

"Gentoo__Overlay_Overlay" in Gentoo::Overlay::Types

path

The full path to the category

isa => Dir, lazy, ro

"Dir" in MooseX::Types::Path::Class

ATTRIBUTE ACCESSORS

package_names

for( $category->package_names ){
    print $_;
}

"_packages"

packages

my %packages = $category->packages;

"_packages"

get_package

my $package = $category->get_package('Moose');

"_packages"

PRIVATE ATTRIBUTES

_packages

isa => HashRef[ Gentoo__Overlay_Package ], lazy_build, ro

accessors => _has_package , package_names,
             packages, get_package

"_has_package"

"package_names"

"packages"

"get_package"

PRIVATE ATTRIBUTE ACCESSORS

_has_package

$category->_has_package('Moose');

"_packages"

PRIVATE CLASS ATTRIBUTES

_scan_blacklist

Class-Wide list of blacklisted directory names.

isa => HashRef[ Str ], ro, lazy

accessors => _scan_blacklisted

"_scan_blacklisted"

MooseX::Types::Moose

PRIVATE CLASS ATTRIBUTE ACCESSORS

_scan_blacklisted

is $arg blacklisted in the Class Wide Blacklist?

::Category->_scan_blacklisted( $arg )
   ->
exists ::Category->_scan_blacklist->{$arg}

"_scan_blacklist"

PRIVATE METHODS

_build__packages

Generates the package Hash-Table, by scanning the category directory.

"_packages"

AUTHOR

Kent Fredric <kentnl@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 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.