Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.204.002 Times

Array::Iterator 0.06

  Date Added: April 25, 2010  |  Visits: 713

Array::Iterator

Report Broken Link
Printer Friendly Version


Product Homepage
Download (99 downloads)



Array::Iterator is a simple class for iterating over Perl arrays. SYNOPSIS use Array::Iterator; # create an iterator with an array my $i = Array::Iterator->new(1 .. 100); # create an iterator with an array reference my $i = Array::Iterator->new(@array); # create an iterator with a hash reference my $i = Array::Iterator->new({ __array__ => @array }); # a base iterator example while ($i->hasNext()) { if ($i->peek() < 50) { # ... do something because # the next element is over 50 } my $current = $i->next(); # ... do something with current } # shortcut style my @accumulation; push @accumulation => { item => $iterator->next() } while $iterator->hasNext(); # C++ ish style iterator for (my $i = Array::Iterator->new(@array); $i->hasNext(); $i->next()) { my $current = $i->current(); # .. do something with current } # common perl iterator idiom my $current; while ($current = $i->getNext()) { # ... do something with $current } This class provides a very simple iterator interface. It is is uni-directional and can only be used once. It provides no means of reverseing or reseting the iterator. It is not recommended to alter the array during iteration, however no attempt is made to enforce this (although I will if I can find an efficient means of doing so). This class only intends to provide a clear and simple means of generic iteration, nothing more (yet)..

Requirements: No special requirements
Platforms: Linux
Keyword: Array Arrayiterator Class Current Do Something I- Iterator Libraries Programming Simple
Users rating: 0/10

License: Freeware Size: 10.24 KB
USER REVIEWS
More Reviews or Write Review


ARRAY::ITERATOR RELATED
Libraries  -  DBIx::DWIW 0.44
DBIx::DWIW is a Perl module for robust and simple DBI wrapper to Do What I Want (DWIW). SYNOPSIS When used directly: use DBIx::DWIW; my $db = DBIx::DWIW->Connect(DB => $database, User => $user, Pass => $password, Host => $host); my...
22.53 KB  
Libraries  -  perltoot 5.8.8
perltoot is Toms object-oriented tutorial for perl. Object-oriented programming is a big seller these days. Some managers would rather have objects than sliced bread. Why is that? Whats so special about an object? Just what is an object anyway?...
12.2 MB  
Registry Tools  -  Do Something When 1.2
Do Something When is a system preference pane that allows the user to watch for drives mounting and un-mounting, allowing you to launch or quit applications, when these events happen. You can launch iTunes when your music hard drive gets mounted,...
628 KB  
Libraries  -  MP3::Find::Base 0.06
MP3::Find::Base is a base class for MP3::Find backends. SYNOPSIS package MyFinder; use base MP3::Find::Base; sub search { my $self = shift; my ($query, $dirs, $sort, $options) = @_; # do something to find and sort the mp3s... my...
29.7 KB  
Libraries  -  Googolplex 0.1.0
Googolplex is just a Python class to do a query on Google search engine, parse it and returns the result as a list. My friend Matias Torchinsky wrote me a pretty brief history about the Googolplex: "According to the penguin dictionary of...
10.24 KB  
Libraries  -  Slay::Makefile 0.01
Slay::Makefile is a wrapper to Slay::Maker that reads the rules from a file. SYNOPSIS Slay::Maker is a make engine that uses perl declaration syntax for rules, including regular expressions for targets and anonymous subs for targets,...
13.31 KB  
Libraries  -  Array::Each::Tutorial 0.02
Array::Each::Tutorial - POD giving various examples how to use Array::Each. SYNOPSIS man Array::Each man Array::Each::Tutorial or perldoc Array::Each perldoc Array::Each::Tutorial Overview This tutorial contains only POD, so dont do...
20.48 KB  
Libraries  -  Iterator 0.03
Iterator is a general-purpose iterator class. SYNOPSIS use Iterator; # Making your own iterators from scratch: $iterator = Iterator->new ( sub { code } ); # Accessing an iterators values in turn: $next_value = $iterator->value(); # Is...
22.53 KB  
Libraries  -  Iterator::BreakOn 0.3
Iterator::BreakOn is a Perl module to create iterators with control flow breaks. SYNOPSIS use Iterator::BreakOn; # # get a generic data source with a next method implemented whom # returns a generic object # # in this example the order...
13.31 KB  
Libraries  -  Class::Adapter 1.02
Class::Adapter is a Perl implementation of the "Adapter" Design Pattern. The Class::Adapter class is intended as an abstract base class for creating any sort of class or object that follows the Adapter pattern. What is an Adapter? The term...
24.58 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB