Iterator::BreakOn 0.3
Sponsored Links
Iterator::BreakOn 0.3 Ranking & Summary
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
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
Iterator::BreakOn 0.3 Keywords
BreakOn
BreakOn 0.3
To Create
Perl module
control flow
location
data
item
name
breaks
something
Iterator::BreakOn
IteratorBreakOn
Iterator::BreakOn 0.3
Libraries
Programming
Bookmark Iterator::BreakOn 0.3
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
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
break
perl modules
how to create a website
control flow statements
control flow graph
to create a website
control flow houston
how to create a web page
install perl module
define control flow
to create competitive advantage
to create a warlike feel
location finder
liquid control flow meter
control flow diagram
to create an automated system recovery set using backup
how to create a resume
control flow hydraulics
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
Latest Software
Popular Software
Favourite Software