NAME

Net::Radio::oFono::Helpers::IteratableContainer - simple container allows iterating over contained elements

DESCRIPTION

This package implements a class which will act as a container for items of any type. In addition to Net::Radio::oFono::Helpers::Container it allows iterating over it's content.

Per default following operators to the container instances are overloaded:

@{}

Gives plain access to the managed list of items.

bool

Returns a boolean value (always true).

0+

Returns the number of managed elements.

<>

Iterates over all items and returns the currently selected on or undef, if end of list is reached.

-=

Reduces the iteration pointer by count.

+=

Increases the iteration pointer by count.

${}

Returns the currently selected item in an iteration.

INHERITANCE

Net::Radio::oFono::Helpers::IteratableContainer
ISA Net::Radio::oFono::Helpers::Container

METHODS

remove

Removes an item from the container.

Parameters:

item

Item to remove from the container.

Returns:

The removed element in scalar mode and and array containing the removed element at position 0 and it's index in the managed list at index 1 in array mode.

decrease_by

Invoked via overloaded -= operator.

increase_by

Invoked via overloaded += operator.

as_array

Invoked by overloaded @{} operator.

iterate

Invoked by overloaded <> operator.

n_elements

Returns the number of elements contained.

curr_item

Invoked by overloaded ${} operator.

BUGS

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

If you think you've found a bug then please read "How to Report Bugs Effectively" by Simon Tatham: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html.

SUPPORT

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

perldoc Net::Radio::oFono

You can also look for information at:

Where can I go for help with a concrete version?

Bugs and feature requests are accepted against the latest version only. To get patches for earlier versions, you need to get an agreement with a developer of your choice - who may or not report the issue and a suggested fix upstream (depends on the license you have chosen).

Business support and maintenance

For business support you can contact Jens via his CPAN email address rehsackATcpan.org. Please keep in mind that business support is neither available for free nor are you eligible to receive any support based on the license distributed with this package.

ACKNOWLEDGEMENTS

AUTHOR

Jens Rehsack, <rehsack at cpan.org>

LICENSE AND COPYRIGHT

Copyright 2012 Jens Rehsack.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.