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.163.418 Times

Iterator::IO 0.02

  Date Added: March 05, 2010  |  Visits: 755

Iterator::IO

Report Broken Link
Printer Friendly Version


Product Homepage
Download (87 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
USER REVIEWS
More Reviews or Write Review


ITERATOR::IO RELATED
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  -  File::Revision 0.03
File::Revision is a Perl module to return a name of non-existing backup file with a revision id. SYNOPSIS ####### # Subroutine interface # use File::Revision qw(new_revision num2revision parse_options revision2num revision_file rotate);...
89.09 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  -  Iterator::Util 0.02
Iterator::Util Perl package contains essential utilities for the Iterator class. SYNOPSIS use Iterator::Util; # Transform sequences $iterator = imap { transformation code } $some_other_iterator; # Filter sequences $iterator = igrep {...
20.48 KB  
Libraries  -  FFI::Library 1.02
FFI::Library is a module with Perl Access to Dynamically Loaded Libraries. SYNOPSIS use FFI::Library; $lib = FFI::Library->new("mylib"); $fn = $lib->function("fn", "signature"); $ret = $fn->(...); This module provides access from Perl to...
16.38 KB  
Libraries  -  Exception::Class::TryCatch 1.10
Exception::Class::TryCatch is a syntactic try/catch sugar for use with Exception::Class. SYNOPSIS use Exception::Class::TryCatch; # simple usage of catch() eval { Exception::Class::Base->throw(error) }; catch my $err and warn $err->error;...
15.36 KB  
Libraries  -  Alien::scriptaculous 1.002
Alien::scriptaculous is a Perl module for installing and finding script.aculo.us. SYNOPSIS use Alien::scriptaculous; ... $version = Alien::scriptaculous->version(); $path = Alien::scriptaculous->path(); ... Alien::scriptaculous->install(...
100.35 KB  
Libraries  -  Inline-API 0.44
Inline-API is a Perl module that teach you how to bind a programming language to Perl using Inline.pm. SYNOPSIS #!/usr/bin/perl use Inline Foo; say_it(foo); # Use Foo to print "Hello, Foo" __Foo__ foo-sub say_it { foo-my $foo =...
91.14 KB  
Libraries  -  Contextual::Return 0.1.0
Contextual::Return is a Perl module to create context-senstive return values. SYNOPSIS use Contextual::Return; use Carp; sub foo { return SCALAR { thirty-twelve } BOOL { 1 } NUM { 7*6 } STR { forty-two } LIST { 1,2,3 } HASHREF {...
22.53 KB  
Libraries  -  IPC::LDT 2.03
IPC::LDT is a Perl module that implements a length based IPC protocol. Interprocess communication often uses line (or record) oriented protocols. FTP, for example, usually is such a protocol: a client sends a command (e.g. "LS") which is...
13.31 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