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

File::CounterFile 1.04

  Date Added: April 04, 2010  |  Visits: 972

File::CounterFile

Report Broken Link
Printer Friendly Version


Product Homepage
Download (98 downloads)



File::CounterFile is a persistent counter class. SYNOPSIS use File::CounterFile; $c = File::CounterFile->new("COUNTER", "aa00"); $id = $c->inc; open(F, ">F$id"); This module implements a persistent counter class. Each counter is represented by a separate file in the file system. File locking is applied, so multiple processes can attempt to access a counter simultaneously without risk of counter destruction. You give the file name as the first parameter to the object constructor (new). The file is created if it does not exist. If the file name does not start with "/" or ".", then it is interpreted as a file relative to $File::CounterFile::DEFAULT_DIR. The default value for this variable is initialized from the environment variable TMPDIR, or /usr/tmp if no environment variable is defined. You may want to assign a different value to this variable before creating counters. If you pass a second parameter to the constructor, it sets the initial value for a new counter. This parameter only takes effect when the file is created (i.e. it does not exist before the call). When you call the inc() method, you increment the counter value by one. When you call dec(), the counter value is decremented. In both cases the new value is returned. The dec() method only works for numerical counters (digits only). You can peek at the value of the counter (without incrementing it) by using the value() method. The counter can be locked and unlocked with the lock() and unlock() methods. Incrementing and value retrieval are faster when the counter is locked, because we do not have to update the counter file all the time. You can query whether the counter is locked with the locked() method. There is also an operator overloading interface to the File::CounterFile object. This means that you can use the ++ operator for incrementing and the -- operator for decrementing the counter, and you can interpolate counters directly into strings..

Requirements: No special requirements
Platforms: Linux
Keyword: Counter Counterfile File Filecounterfile Libraries Method Persistent Programming Value Variable
Users rating: 0/10

License: Freeware Size: 5.12 KB
USER REVIEWS
More Reviews or Write Review


FILE::COUNTERFILE RELATED
Libraries  -  B::JVM::Jasmin::Emit 0.02
B::JVM::Jasmin::Emit is a package used by B::JVM::Jasmin to emit Jasmin syntaxed file. SYNOPSIS use B::JVM::Jasmin::Emit; my $emitter = new B::JVM::Emit(FILEHANDLE); # ... $emitter->DIRECTIVE_NAME([@ARGS]); # ......
44.03 KB  
Programming  -  devkitPro 1.5.7
This project is for homebrew console development tools based on the gnu compiler collection with additional tools and libraries to aid programming each supported console. The windows variants are built with MinGW.
444.26 KB  
Libraries  -  File::lockf 0.20
File::lockf is a Perl module interface to the lockf system call. SYNOPSIS use File::lockf; File-Lockf is an interface to the lockf system call. Perl supports the flock system call natively, but that does not acquire network locks. Perl also...
3.07 KB  
Libraries  -  JsHttpRequest 5.0
JsHttpRequest project is an easy-to-use cross-browser AJAX library with AJAX file uploading support and many other features. JsHttpRequest first appeared as cross-browser analogue of XMLHttpRequest, and then became a very useful instrument to...
122.88 KB  
Libraries  -  FLV::Header 0.03
FLV::Header is a flash video file data structure. METHODS This is a subclass of FLV::Base. $self->parse($fileinst) Takes a FLV::File instance and extracts the FLV header from the file stream. This method throws exceptions if the stream is...
737.28 KB  
Libraries  -  FLV::Body 0.03
FLV::Body is a flash video file data structure. METHODS This is a subclass of FLV::Base. $self->parse($fileinst) Takes a FLV::File instance and extracts the FLV body from the file stream. This method throws exceptions if the stream is not...
737.28 KB  
Libraries  -  FLV::Tag 0.03
FLV::Tag is a flash video file data structure. This is a subclass of FLV::Base. $self->parse($fileinst) Takes a FLV::File instance and extracts an FLV tag from the file stream. This method then multiplexes that tag into one of the subtypes:...
737.28 KB  
Libraries  -  Web 1.35
Web Perl module contains a set of useful routines for many webworking purposes. This module was primarily made for UNIX/Linux-Systems. Parts of it cannot be used on other systems. E.g. the procedures for file locking demand systems that can use...
17.41 KB  
Text Management  -  Record-Jar Parser 1.0
This script presents you a method to parse a file like object containing data in the record jar format.
 
Video Editors  -  AVI TV Episode File Resizer 1.0
AVI TV Episode File Resizer script is not for multiple MOVIE files (only TV) however it can do SINGLE MOVIE files quite nicely. The project was designed to help me fit (resize the file) multiple Xvid TV episodes (entire season) on a single DVD....
11.26 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