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 31.591.413 Times

Iterator::IO 0.02

  Date Added: March 05, 2010  |  Visits: 602


Report Broken Link
Printer Friendly Version

Product Homepage
Download (70 downloads)

Iterator::IO is a Perl module with filesystem and stream iterators. SYNOPSIS use Iterator::IO; # Return the names of files in a directory (except . and ..) $iter = idir_listing ($path); # Return all the files in a directory tree, one at a time. # Like File::Find, in slow motion. $iter = idir_walk ($path); # Return the lines of a file, one at a time. $iter = ifile ($filename, %options); # Return the lines of a file, in reverse order $iter = ifile_reverse ($filename, %options); This module provides filesystem and stream iterator functions. See the Iterator module for more information about how to use iterators. FUNCTIONS idir_listing $iter = idir_listing ($path); Iterator that returns the names of the files in the $path directory. If $path is omitted, defaults to the current directory. Does not return the . and .. files (under unix). Requires IO::Dir and Cwd. Example: To return only certain files, combine this with an igrep: $iter = igrep {-s && -M < 1} idir "/some/path"; (Returns non-empty files modified less than a day ago). (igrep) is defined in the Iterator::Util module). idir_walk $iter = idir_walk ($path); Returns the files in a directory tree, one by one. Its sort of like File::Find in slow motion. Requires IO::Dir and Cwd. ifile $iter = ifile ($filename, %options); Opens a file, generates an iterator to return the lines of the file. %options is a reference to a hash of options. Currently, two options are supported: chomp chomp => boolean indicates whether lines should be chomped before being returned by the iterator. The default is true. $/ $/ => value specifies what string to use as the record separator. If not specified, the current value of $/ is used. "rs" or "input_record_separator" may be used as option names instead of "$/", if you find that to be more readable. See the English module. Option names are case-insensitive. ifile requires IO::File. ifile_reverse $iter = ifile_reverse ($filename, %options); Exactly the same as "ifile", but reads the lines of the file backwards. The input_record_separator option values undef (slurp whole file) and scalar references (fixed-length records) are not currently supported. INTERFACE CHANGE In version 0.01 of Iterator::IO, the "ifile" and ifile_reverse functions accepted their options in a different manner. This has now changed to operate via a hash reference of options. The old way will still work, but is deprecated and will be removed in a future release. EXPORTS This module exports all function names to the callers namespace by default. DIAGNOSTICS Iterator::IO uses Exception::Class objects for throwing exceptions. If youre not familiar with Exception::Class, dont worry; these exception objects work just like $@ does with die and croak, but they are easier to work with if you are trapping errors. See the Iterator module documentation for more information on how to trap and handle these exception objects. Parameter Errors Class: Iterator::X::Parameter_Error You called an Iterator::IO function with one or more bad parameters. Since this is almost certainly a coding error, there is probably not much use in handling this sort of exception. As a string, this exception provides a human-readable message about what the problem was. Exhausted Iterators Class: Iterator::X::Exhausted You called value on an iterator that is exhausted; that is, there are no more values in the sequence to return. As a string, this exception is "Iterator is exhausted." I/O Errors Class: Iterator::X::IO_Error This exception is thrown when any sort of I/O error occurs; this only happens with the filesystem iterators. This exception has one method, os_error, which returns the original $! that was trapped by the Iterator object. As a string, this exception provides some human-readable information along with $!. Internal Errors Class: Iterator::X::Internal_Error Something happened that I thought couldnt possibly happen. I would appreciate it if you could send me an email message detailing the circumstances of the error..

Requirements: No special requirements
Platforms: Linux
Keyword: Exception Ifile Iter Iterator Iteratorio Libraries Module Perl Module Programming Return
Users rating: 0/10

License: Freeware Size: 14.34 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  -  Alien Perl module 0.91
Alien Perl module package contains external libraries wrapped up for your viewing pleasure! SYNOPSIS perldoc Alien; Alien is a package that exists just to hold together an idea, the idea of Alien:: packages, so there is no code here, just...
10.24 KB  
Libraries  -  OpenGeoDB Perl module 0.4
OpenGeDB Perl module is a module to access the OpenGeoDB database and calculate all ZIP codes in a certain radius..
3.07 KB  
Libraries  -  Syntax::Highlight::Perl 1.0
Syntax::Highlight::Perl is a Perl module that can highlight Perl Syntactical Structures. SYNOPSIS # simple procedural use Syntax::Highlight::Perl :BASIC; # or :FULL print format_string($my_string); # OO use Syntax::Highlight::Perl; my...
33.79 KB  
Libraries  -  Basset::Container::Hash 1.04
Basset::Container::Hash Perl module implements a layered hash. The easiest way to explain is with an example: my %x = (a => b); tie my %y, Basset::Container::Hash, %x; #<- %x is the parent of y. print $x{a}; #prints b print $y{a}; #prints b...
143.36 KB  
Network & Internet  -  MyCMS perl module 1.0
MyCMS perl module provides the MN::CMS Perl module used by the MyCMS. MyCMS perl module contains Perl object classes to manage the data of MyCMS (such as articles, links, and images). MN::CMS is a perl module that allows you to manage an...
16.38 KB  
Libraries  -  Java::JVM::Classfile 0.19
Java::JVM::Classfile is a Perl module to parse JVM Classfiles. SYNOPSIS use Java::JVM::Classfile; my $c = Java::JVM::Classfile->new("HelloWorld.class"); print "Class: " . $c->class . "n"; print "Methods: " . scalar(@{$c->methods}) . "n";...
19.46 KB  
Libraries  -  CSS::SAC 0.06
CSS::SAC Perl module is a SAC CSS parser. SYNOPSIS use CSS::SAC qw(); use My::SACHandler (); use My::SACErrors (); my $doc_handler = My::SACHandler->new; my $err_handler = My::SACErrors->new; my $sac = CSS::SAC->new({ DocumentHandler =>...
37.89 KB  
Libraries  -  Chart::Graph::Xrt2d 3.2
Chart::Graph::Xrt2d is a Perl module for creating graph charts. SYNOPSIS #Include module use Chart::Graph::Xrt2d qw(xrt2d); # Function call xrt2d(%options, [%data_options1, @data_set1], [%data_options2, @data_set2], . . ); This...
245.76 KB  
Libraries  -  Class::Adapter::Builder 1.02
Class::Adapter::Builder is a Perl module that can generate Class::Adapter classes. SYNOPSIS package My::Adapter; use strict; use Class::Adapter::Builder ISA => Specific::API, METHODS => [ qw{foo bar baz} ], method => different_method;...
24.58 KB  
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, 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.13.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