Alzabo::ChangeTracker(3pm) User Contributed Perl Documentation Alzabo::ChangeTracker(3pm)NAME
Alzabo::ChangeTracker - Saves a set of changes as callbacks that can be backed out if needed
SYNOPSIS
use Alzabo::ChangeTracker;
my $x = 0;
my $y = 1;
sub foo
{
my $tracker = Alzabo::ChangeTracker->new;
$tracker->add( sub { $x = 0; } );
$x = 1;
bar();
eval { something; };
$tracker->backout if $@;
}
sub bar
{
my $tracker = Alzabo::ChangeTracker->new;
$tracker->add( sub { $y = 1; } );
$y = 2;
}
DESCRIPTION
The trick ...
We only want to have one object of this type at any one time. In addition, only the stack frame that created it should be able to clear it
(except through a backout). Why? Here's an example in pseudo-code to help explain it:
sub foo
{
create a tracker;
store some change info in the tracker;
call sub bar;
store some change info in the tracker;
# point Y
clear changes in tracker;
}
sub bar
{
create a tracker; # internally, we really just increment our stack count
store some change info in the tracker;
clear changes in tracker; # point X
}
If at point X we were to really clear out the changes, even the changes just from sub bar, we'd have a problem. Because if at point Y,
things go to hell and we want to back out the changes, we want to back out the changes from sub foo _AND_ sub bar. However, if bar is also
an entry point we want to be able to track changes in bar and clear them from bar.
AUTHOR
Dave Rolsky, <autarch@urth.org>
perl v5.8.8 2007-12-23 Alzabo::ChangeTracker(3pm)
Check Out this Related Man Page
Alzabo::Driver::PostgreSQL(3pm) User Contributed Perl Documentation Alzabo::Driver::PostgreSQL(3pm)NAME
Alzabo::Driver::PostgreSQL - PostgreSQL specific Alzabo driver subclass
SYNOPSIS
use Alzabo::Driver::PostgreSQL;
DESCRIPTION
This provides some PostgreSQL specific implementations for the virtual methods in Alzabo::Driver.
METHODS
connect, create_database, drop_database
Besides the parameters listed in the Alzabo::Driver docs, the following parameters are accepted:
* options
* tty
schemas
This method accepts the same parameters as the "connect()" method.
get_last_id
Returns the last id created for a sequenced column.
identifier_length
Returns the maximum identifier length allowed by the database. This is really a guess based on the server version, since the actual value
is set when the server is compiled.
BUGS
In testing, I found that there were some problems using Postgres in a situation where you start the app, connect to the database, get some
data, fork, reconnect, and and then get more data. I suspect that this has more to do with the DBD::Pg driver and/or Postgres itself than
Alzabo. I don't believe this would be a problem with an app which forks before ever connecting to the database (such as mod_perl).
AUTHOR
Dave Rolsky, <autarch@urth.org>
perl v5.8.8 2007-12-23 Alzabo::Driver::PostgreSQL(3pm)
Wowee, step off the bandwagon for a few months and it's amazing what can change. I'm still not sure if this is, in fact, but if it is, what made Neo change his mind about an OT thread? (7 Replies)
Let me explain my problem, I have a file in the following format
9602622 - User ID
01 -2 - Question number & Grade
02 - 3
03 - 7
04 - 12
05 - 9
06 - 0
9601664 - User ID
01 -2
02 - 3
03 - 7
04 - 12
05 - 9
06 - 0
I need to change the file so it looks like this
9601664 54 -... (1 Reply)
i have a file calld dir.list, it is looking like that:
@/cav
@/mnt
@/syscat/bar
/tts
/usr/cach
/bar
what i want is to write a script that will chack to see if the line begin with the @, then it should add $x to tne name without the @, like
@/cav will result in /xxxxxxx/cav......
and... (2 Replies)
1|foo|bar
2|usa|ll
3|usa|vg
4|usa|vg
5|bar|vg
6|usa|vg
7|usa|ll
8|uk|nn
9|foo|manu|bar
10|uk|bb
11|foo|mm
12|kuwait|jkj
13|kuwait|mm
14|dubai|hh
awk '/foo/,/bar/' test_file1----command run at the prompt
output should have been the first 3 lines......
1|foo|bar (1 Reply)
Hi friends,
how can I show a progress bar for any running process in the shell script.
For example when I am copying or compressing a file.
Thanks. (1 Reply)
Hi, I have two files "foo" and "bar"
$ cat foo
a is \$a and b is \$b
$ cat bar
car tree
using the below 'while' loop I expect the output to be: a is car and b is tree
while read a b; do
eval echo $(cat foo) # o/p: a is $a and b is $b
eval "echo $(eval "cat foo")"... (1 Reply)
I have something like in the script. Can anyone explain what does the sort command does and followed by the sed
sort -r -k3.7,3 -k3.1,3 -k3.4,3 -t: $dir"abc_"$x"_parsed" | sed -e 's/\(\)\(\{3\}\)/\1,\2/2' -e 's/\/2,00/\/200/'
The file abc_"$x"_parsed contains something like below
... (7 Replies)
foo.txt
1 rs2887286 0 1145994 C T
1 rs1240743 0 1323299 C A
1 rs1695824 0 1355433 G T
1 rs3766180 0 1468016 G A
1 rs7519837 0 1500664 A G
1 rs2272908 0 ... (12 Replies)
Hi,
How to change the value after the symbol '@' ?
$
i.e. @mac1
I want to change it to @prod2
Also need to change the same in the title bar on the top when we open a new terminal. (3 Replies)
Hello all,
I need some help please.
I got file1 with names.
foo bar
foo bar
foo bar
foo bar
foo bar
and I got file2 with some text
some text
some text
#KEYWORD
some text
some text
some text (3 Replies)