Slackware::Slackget::SpecialFiles::PACKAGES - An interface for the special file PACKAGES.TXT


Slackware-Slackget documentation  | view source Contained in the Slackware-Slackget distribution.

Index


NAME

Top

Slackware::Slackget::SpecialFiles::PACKAGES - An interface for the special file PACKAGES.TXT

VERSION

Top

Version 1.0.0

SYNOPSIS

Top

This class contain all methods for the treatment of the PACKAGES.TXT file

    use Slackware::Slackget::SpecialFiles::PACKAGES;

    my $pack = Slackware::Slackget::SpecialFiles::PACKAGES->new('PACKAGES.TXT','slackware');
    ...

WARNINGS

Top

All classes from the Slackware::Slackget::SpecialFiles:: namespace need the followings methods :

	- a contructor new()
	- a method compil()
	- a method get_result(), which one can be an alias on another method of the class.

Moreover, the get_result() methode need to return a hashref. Keys of this hashref are the filenames.

Classes from ths namespace represent an abstraction of the special file they can manage so informations stored in the returned hashref must have a direct link with this special file.

CONSTRUCTOR

Top

new

Take a file, a Slackware::Slackget::Config object and an id name :

	my $pack = Slackware::Slackget::SpecialFiles::PACKAGES->new('PACKAGES.TXT',$config,'slackware');

FUNCTIONS

Top

compile

Take no argument, and compile the informations contains in the PACKAGES.TXT file into the internal data structure of slack-get.

	$pack->compile ;

create_entities

This method take the whole file PACKAGES.TXT and split it into entity (one package or meta informations)

get_meta

This method parse the 10 first lines of the PACKAGES.TXT and extract globals informations. It define the 'starting-position' object tag (this information is only for coders).

	$pack->get_meta();

get_result

Not yet implemented.

get_package

Return informations relative to a packages as a hashref.

	my $hashref = $list->get_package($package_name) ;

get_date

return a Slackware::Slackget::Date object, which is the date of the PACKAGES.TXT

	my $date = $pack->get_date ;

to_XML (deprecated)

Same as to_xml(), provided for backward compatibility.

to_xml

return the package as an XML encoded string.

	$xml = $package->to_xml();

AUTHOR

Top

DUPUIS Arnaud, <a.dupuis@infinityperl.org>

BUGS

Top

Please report any bugs or feature requests to bug-Slackware-Slackget@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Slackware-Slackget. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

Top

You can find documentation for this module with the perldoc command.

    perldoc Slackware::Slackget




You can also look for information at:

* Infinity Perl website

http://www.infinityperl.org/category/slack-get

* slack-get specific website

http://slackget.infinityperl.org

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=Slackware-Slackget

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/Slackware-Slackget

* CPAN Ratings

http://cpanratings.perl.org/d/Slackware-Slackget

* Search CPAN

http://search.cpan.org/dist/Slackware-Slackget

ACKNOWLEDGEMENTS

Top

Thanks to Bertrand Dupuis (yes my brother) for his contribution to the documentation.

COPYRIGHT & LICENSE

Top


Slackware-Slackget documentation  | view source Contained in the Slackware-Slackget distribution.