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

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

Serving Software Downloads in 976 Categories, Downloaded 29.985.608 Times

Array::Iterator 0.06

  Date Added: April 25, 2010  |  Visits: 521

Array::Iterator

Report Broken Link
Printer Friendly Version


Product Homepage
Download (72 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
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  
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  
Libraries  -  Array::Compare 1.14
SYNOPSIS use Array::Compare; my $comp1 = Array::Compare->new; $comp->Sep(|); $comp->Skip({3 => 1, 4 => 1}); $comp->WhiteSpace(0); $comp->Case(1); my $comp2 = Array::Compare->new(Sep => |, WhiteSpace => 0, Case => 1, Skip => {3 => 1, 4...
8.19 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
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  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.12.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...
2.73 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