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

File::CounterFile 1.04

  Date Added: April 04, 2010  |  Visits: 787

File::CounterFile

Report Broken Link
Printer Friendly Version


Product Homepage
Download (80 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  -  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  -  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  -  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.
 
Libraries  -  Tie::CountLoop 1.5
Tie::CountLoop is a Perl module that helps you have a counter looping in a scalar with min max and increment value. SYNOPSIS use Tie::CountLoop; tie my $counter , Tie::CountLoop,15 ,-1 ,15 ,7 ,0; my $t = tied $counter; $t->increment( 1 );...
3.07 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
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 freedesktop.org, 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.11.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...
2.73 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