Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

vend::interpolate(3pm) [debian man page]

Vend::Interpolate(3pm)					User Contributed Perl Documentation				    Vend::Interpolate(3pm)

NAME
Vend::Interpolate -- Interchange tag interpolation routines SYNOPSIS
(no external use) DESCRIPTION
The Vend::Interpolate contains the majority of the Interchange Tag Language implementation rouines. Historically, it contained the entire tag language implementation for MiniVend, accounting for its name. It contains most of the handler routines pointed to by Vend::Parse, which accepts the parsing output of Vend::Parser. (Vend::Parser was originally based on HTML::Parser 1.x). There are two interpolative parsers in Vend::Interpolate, iterate_array_list() and iterate_hash_list() -- these routines parse the lists used in the widely employed [loop ..], [search-region ...], [item-list], and [query ..] ITL tag constructs. This module makes heavy use of precompiled regexes. You will notice variables being used in the regular expression constructs. For example, $All is a a synonym for "(?s:.)*", $Some is equivalent to "(?s:.)*?", etc. This is not only for clarity of the regular expression, but for speed. perl v5.14.2 2011-03-09 Vend::Interpolate(3pm)

Check Out this Related Man Page

Vend::CounterFile(3pm)					User Contributed Perl Documentation				    Vend::CounterFile(3pm)

NAME
Vend::CounterFile - Persistent counter class SYNOPSIS
use Vend::CounterFile; $c = new Vend::CounterFile "COUNTER", "aa00"; $id = $c->inc; open(F, ">F$id"); DESCRIPTION
(This module is modified from Gisle Aas File::CounterFile to use Interchange's locking protocols -- lack of fcntl locking was causing counter problems.) 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 might try to access the same counters at the same time 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 $Vend::CounterFile::DEFAULT_DIR. The default value for this variable is initialized from the environment variable "TMPDIR", or /usr/tmp is 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, that 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 decrementd. 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 is 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 Vend::CounterFile object. This means that you might use the "++" operator for incrementing the counter, "--" operator for decrementing and you can interpolate counters diretly into strings. BUGS
(This problem alleviated by this modified module) It uses flock(2) to lock the counter file. This does not work on all systems. Perhaps we should use the File::Lock module? COPYRIGHT
Copyright (c) 1995-1998 Gisle Aas. All rights reserved. Modifications made by and copyright (C) 2002 Red Hat, Inc. and (c) 2002-2007 Interchange Development Group This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. AUTHOR
Gisle Aas <aas@sn.no> perl v5.14.2 2010-03-25 Vend::CounterFile(3pm)
Man Page