Main > Programming > Libraries >

Iterator::BreakOn 0.3

Iterator::BreakOn 0.3

Sponsored Links

Iterator::BreakOn 0.3 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.013 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 889
Date added: 2007-05-18
Publisher: Víctor Moral

Iterator::BreakOn 0.3 description

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 of the items in the data stream is assumed
# to be:
# location, zipcode, name
#
my $datasource = $myschema->resultset(mytable)->search();

my $iter = Iterator::BreakOn->new(
datasource => $datasource,
break_before => [
qw(location)
],
break_after => [
location => &after_location,
zipcode
],
on_last_item => sub { print "Finnished !"; },
);

#
# There are three uses modes:
#
# Fully automatic mode: useless if not defined code for breaks
$iter->run();

# Semi-automatic mode: get only the item (run automatically the other
# events)
while (my $data_item = $iter->next()) {
# do something with data ...
1;
}

# Manual mode: get every event as an object
while (my $event = $iter->next_event()) {
if ($event->name() eq before_location) {
# do something before a new location comes

}
elsif ($event->name() eq after_zipcode)) {
# do something after the last zipcode reached

}
elsif ($event->name() eq next_item ) {
# get the item (including the first and last items)
my $data = $iter->next();

# and do something whit him

}
elsif ($event->name() eq last_item) {
# and do something when the end of data reached

}
} # end while

Iterator::BreakOn 0.3 Screenshot

Advertisements

Iterator::BreakOn 0.3 Keywords

Bookmark Iterator::BreakOn 0.3

Hyperlink code:
Link for forum:

Iterator::BreakOn 0.3 Copyright

WareSeeker periodically updates pricing and software information of Iterator::BreakOn 0.3 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Iterator::BreakOn 0.3 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
Iterator is a general-purpose iterator class. Free Download
Iterator::IO is a Perl module with filesystem and stream iterators. Free Download
Iterator::Misc Perl module package contains miscellaneous iterator functions. Free Download
Iterator::Util Perl package contains essential utilities for the Iterator class. Free Download
Array::Iterator is a simple class for iterating over Perl arrays. Free Download
Thesaurus is a Perl module that maintains lists of associated items. Free Download
Unicode::Unihan is the Unihan Data Base 5.0.0. Free Download
WoW Companion is a Java client/server used to centrally store character, item, and other data for World of Warcraft. Free Download