FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 07-25-2011, 03:43 PM
Julien VAUBOURG
 
Default Bug#635374: ITP: libtie-array-iterable-perl -- Tie::Array::Iterable - Allows creation of iterators for lists and arrays

Package: wnpp
Severity: wishlist
Owner: Julien VAUBOURG <julien@vaubourg.com>


* Package name : libtie-array-iterable-perl
Version : 0.03
Upstream Author : Michael K. Neylon <mneylon-pm@masemware.com>
* URL : http://search.cpan.org/~mneylon/Tie-Array-Iterable-0.03/Iterable.pm
* License : Artistic
Programming Lang: Perl
Description : Tie::Array::Iterable - Allows creation of iterators for lists and arrays

Tie::Hash::Iterable allows one to create iterators for lists and arrays. The concept of iterators is borrowed from the C++ STL [1], in which most of the collections have iterators, though this class does not attempt to fully mimic it.

Typically, in C/C++ or Perl, the 'easy' way to visit each item on a list is to use a counter, and then a for( ;; ) loop. However, this requires knowledge on how long the array is to know when to end. In addition, if items are removed or inserted into the array during the loop, then the counter will be incorrect on the next run through the loop, and will cause problems.

While some aspects of this are fixed in Perl by the use of for or foreach, these commands still suffer when items are removed or added to the array while in these loops. Also, if one wished to use break to step out of a foreach loop, then restart where they left at some later point, there is no way to do this without maintaining some additional state information.

The concept of iterators is that each iterator is a bookmark to a spot, typically concidered between two elements. While there is some overhead to the use of iterators, it allows elements to be added or removed from the list, with the iterator adjusting appropriate, and allows the state of a list traversal to be saved when needed.



--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110725154332.12118.65545.reportbug@junix">http://lists.debian.org/20110725154332.12118.65545.reportbug@junix
 
Old 07-25-2011, 03:43 PM
Julien VAUBOURG
 
Default Bug#635374: ITP: libtie-array-iterable-perl -- Tie::Array::Iterable - Allows creation of iterators for lists and arrays

Package: wnpp
Severity: wishlist
Owner: Julien VAUBOURG <julien@vaubourg.com>


* Package name : libtie-array-iterable-perl
Version : 0.03
Upstream Author : Michael K. Neylon <mneylon-pm@masemware.com>
* URL : http://search.cpan.org/~mneylon/Tie-Array-Iterable-0.03/Iterable.pm
* License : Artistic
Programming Lang: Perl
Description : Tie::Array::Iterable - Allows creation of iterators for lists and arrays

Tie::Hash::Iterable allows one to create iterators for lists and arrays. The concept of iterators is borrowed from the C++ STL [1], in which most of the collections have iterators, though this class does not attempt to fully mimic it.

Typically, in C/C++ or Perl, the 'easy' way to visit each item on a list is to use a counter, and then a for( ;; ) loop. However, this requires knowledge on how long the array is to know when to end. In addition, if items are removed or inserted into the array during the loop, then the counter will be incorrect on the next run through the loop, and will cause problems.

While some aspects of this are fixed in Perl by the use of for or foreach, these commands still suffer when items are removed or added to the array while in these loops. Also, if one wished to use break to step out of a foreach loop, then restart where they left at some later point, there is no way to do this without maintaining some additional state information.

The concept of iterators is that each iterator is a bookmark to a spot, typically concidered between two elements. While there is some overhead to the use of iterators, it allows elements to be added or removed from the list, with the iterator adjusting appropriate, and allows the state of a list traversal to be saved when needed.



--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110725154332.12118.65545.reportbug@junix">http://lists.debian.org/20110725154332.12118.65545.reportbug@junix
 

Thread Tools




All times are GMT. The time now is 09:22 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org