| 1 | package Slackware::Slackget::SpecialFileContainerList; | ||||||||||
| 2 | |||||||||||
| 3 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 2 | require Slackware::Slackget::List ; | |||||||||
| 7 | |||||||||||
| 8 | =head1 NAME | ||||||||||
| 9 | |||||||||||
| 10 | Slackware::Slackget::SpecialFileContainerList - This class is a container of Slackware::Slackget::SpecialFileContainer object | ||||||||||
| 11 | |||||||||||
| 12 | =head1 VERSION | ||||||||||
| 13 | |||||||||||
| 14 | Version 1.0.0 | ||||||||||
| 15 | |||||||||||
| 16 | =cut | ||||||||||
| 17 | |||||||||||
| 18 | 2 | our $VERSION = '1.0.0'; | |||||||||
| 19 | 2 | our @ISA = qw( Slackware::Slackget::List ); | |||||||||
| 20 | |||||||||||
| 21 | =head1 SYNOPSIS | ||||||||||
| 22 | |||||||||||
| 23 | This class is a container of Slackware::Slackget::SpecialFileContainer object, and allow you to perform some operations on this packages list. As the SpecialFileContainer class, it is a slack-get's internal representation of data. | ||||||||||
| 24 | |||||||||||
| 25 | use Slackware::Slackget::SpecialFileContainerList; | ||||||||||
| 26 | |||||||||||
| 27 | my $containerlist = Slackware::Slackget::SpecialFileContainerList->new(); | ||||||||||
| 28 | $containerlist->add($container); | ||||||||||
| 29 | my $conainer = $containerlist->get($index); | ||||||||||
| 30 | my $container = $containerlist->Shift(); | ||||||||||
| 31 | |||||||||||
| 32 | Please read the Slackware::Slackget::List documentation for more informations (L<Slackware::Slackget::List>). | ||||||||||
| 33 | |||||||||||
| 34 | =head1 CONSTRUCTOR | ||||||||||
| 35 | |||||||||||
| 36 | =head2 new | ||||||||||
| 37 | |||||||||||
| 38 | This class constructor don't take any parameters. | ||||||||||
| 39 | |||||||||||
| 40 | my $containerlist = new Slackware::Slackget::SpecialFileContainerList (); | ||||||||||
| 41 | |||||||||||
| 42 | =cut | ||||||||||
| 43 | |||||||||||
| 44 | sub new | ||||||||||
| 45 | 0 | ▶ | { | ||||||||
|
Subroutine
new: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||
| 46 | 0 | my ($class,%args) = @_ ; | |||||||||
| 47 | 0 | my $self={list_type => 'Slackware::Slackget::SpecialFileContainer','root-tag' => 'slack-get'}; | |||||||||
| 48 | 0 | foreach (keys(%args)) | |||||||||
| 49 | { | ||||||||||
| 50 | 0 | $self->{$_} = $args{$_}; | |||||||||
| 51 | } | ||||||||||
| 52 | 0 | $self->{LIST} = [] ; | |||||||||
| 53 | 0 | $self->{ENCODING} = 'utf8' ; | |||||||||
| 54 | 0 | ▶ | $self->{ENCODING} = $args{'encoding'} if(defined($args{'encoding'})) ; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 55 | 0 | bless($self);#,$class | |||||||||
| 56 | 0 | return $self; | |||||||||
| 57 | } | ||||||||||
| 58 | |||||||||||
| 59 | =head2 get_all_media_id | ||||||||||
| 60 | |||||||||||
| 61 | return a list of all id of the SpecialFileContainers. | ||||||||||
| 62 | |||||||||||
| 63 | =cut | ||||||||||
| 64 | |||||||||||
| 65 | 0 | ▶ | sub get_all_media_id { | ||||||||
|
Subroutine
get_all_media_id: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 66 | 0 | my $self = shift; | |||||||||
| 67 | 0 | my %shortnames=(); | |||||||||
| 68 | 0 | foreach my $obj (@{$self->get_all}){ | |||||||||
| 69 | 0 | $shortnames{$obj->id}=1; | |||||||||
| 70 | } | ||||||||||
| 71 | 0 | return keys(%shortnames); | |||||||||
| 72 | } | ||||||||||
| 73 | |||||||||||
| 74 | |||||||||||
| 75 | =head1 AUTHOR | ||||||||||
| 76 | |||||||||||
| 77 | DUPUIS Arnaud, C<< <a.dupuis@infinityperl.org> >> | ||||||||||
| 78 | |||||||||||
| 79 | =head1 BUGS | ||||||||||
| 80 | |||||||||||
| 81 | Please report any bugs or feature requests to | ||||||||||
| 82 | C<bug-Slackware-Slackget@rt.cpan.org>, or through the web interface at | ||||||||||
| 83 | L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Slackware-Slackget>. | ||||||||||
| 84 | I will be notified, and then you'll automatically be notified of progress on | ||||||||||
| 85 | your bug as I make changes. | ||||||||||
| 86 | |||||||||||
| 87 | =head1 SUPPORT | ||||||||||
| 88 | |||||||||||
| 89 | You can find documentation for this module with the perldoc command. | ||||||||||
| 90 | |||||||||||
| 91 | perldoc Slackware::Slackget | ||||||||||
| 92 | |||||||||||
| 93 | |||||||||||
| 94 | You can also look for information at: | ||||||||||
| 95 | |||||||||||
| 96 | =over 4 | ||||||||||
| 97 | |||||||||||
| 98 | =item * Infinity Perl website | ||||||||||
| 99 | |||||||||||
| 100 | L<http://www.infinityperl.org/category/slack-get> | ||||||||||
| 101 | |||||||||||
| 102 | =item * slack-get specific website | ||||||||||
| 103 | |||||||||||
| 104 | L<http://slackget.infinityperl.org> | ||||||||||
| 105 | |||||||||||
| 106 | =item * RT: CPAN's request tracker | ||||||||||
| 107 | |||||||||||
| 108 | L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Slackware-Slackget> | ||||||||||
| 109 | |||||||||||
| 110 | =item * AnnoCPAN: Annotated CPAN documentation | ||||||||||
| 111 | |||||||||||
| 112 | L<http://annocpan.org/dist/Slackware-Slackget> | ||||||||||
| 113 | |||||||||||
| 114 | =item * CPAN Ratings | ||||||||||
| 115 | |||||||||||
| 116 | L<http://cpanratings.perl.org/d/Slackware-Slackget> | ||||||||||
| 117 | |||||||||||
| 118 | =item * Search CPAN | ||||||||||
| 119 | |||||||||||
| 120 | L<http://search.cpan.org/dist/Slackware-Slackget> | ||||||||||
| 121 | |||||||||||
| 122 | =back | ||||||||||
| 123 | |||||||||||
| 124 | =head1 ACKNOWLEDGEMENTS | ||||||||||
| 125 | |||||||||||
| 126 | Thanks to Bertrand Dupuis (yes my brother) for his contribution to the documentation. | ||||||||||
| 127 | |||||||||||
| 128 | =head1 COPYRIGHT & LICENSE | ||||||||||
| 129 | |||||||||||
| 130 | Copyright 2005 DUPUIS Arnaud, All Rights Reserved. | ||||||||||
| 131 | |||||||||||
| 132 | This program is free software; you can redistribute it and/or modify it | ||||||||||
| 133 | under the same terms as Perl itself. | ||||||||||
| 134 | |||||||||||
| 135 | =cut | ||||||||||
| 136 | |||||||||||
| 137 | 2 | 1; # End of Slackware::Slackget::SpecialFileContainerList | |||||||||