The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Pinto::Index - Represents an 02packages.details.txt file

VERSION

version 0.015

DESCRIPTION

The role of Pinto::IndexManager and Pinto::Index is to create an abstraction layer between the rest of the application and the details of managing the 02packages index file. At the moment, we use three separate index files: one for locally added packages, one for mirrored packages, and a master index that combines the other two according to specific rules. But this file-based design is ugly and doesn't perform well. So in the future, I hope to replace those files with a proper database.

ATTRIBUTES

packages()

Returns a reference to hash of packages listed in this index. The keys are packages names (as strings) and the values are the associated Pinto::Package objects.

write(file => '02packages.details.txt.gz')

Writes this Index to file in the format of the 02packages.details.txt file. The file will also be gzipped. If the file argument is not explicitly given here, the name of the file is taken from the file attribute for this Index.

METHODS

reload()

Clears all the packages in this Index and reloads them from the file specified by the file attribute.

clear()

Removes all packages from this Index.

remove( @packages )

Removes the packages from the index. Whenever a package is removed, all the other packages that belonged in the same distribution are also removed. Arguments can be Pinto::Package objects or package names as strings.

package_count()

Returns the total number of packages currently in this Index.

AUTHOR

Jeffrey Ryan Thalhammer <jeff@imaginative-software.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Imaginative Software Systems.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.