I tried moving my use statements nearer to where the classes are
actually getting used, I tried setting 'transaction-isolation =
READ-COMMITTED' in my.cnf, as well as a bunch of other long-shot tactics
and I'm out of things to try.
What I'm trying to do is relatively simple. My problem is that when I
set values this way, all of the values are cached. They do get changed
in the database and show up after about 10 min or so due to what I
assume is caching.
I'm sure I missed something in the docs somewhere about this but I
can't find it so I apologize in advance if this is a newbie question.
Anyway, here's a very simplistic version of what I'm doing:
<form method=post action="/test.html"> # this is test.html
Name: <input type=text name="new_name" value="<% $name_now %>">
<input type=submit value="Send it!">
</form>
<%args>
$new_name => '';
</%args>
#
# create table the_table (id int not null primary key auto_increment,
# setting varchar(20), setting_val varchar(20));
# insert into the_table values( '','name','Flapjack' );
#
<%init>
use lib '/path/to/cdbi/classes';
use CDBI::THIS_TABLE;
if ( $new_thingy ) {
# we were POST'ed a thingy
my $line = CDBI::THIS_TABLE->search( { setting => 'name' } )->next();
if ( $line ) {
$line->setting_val( $new_thingy );
} else {
CDBI::THIS_TABLE->create( { setting => 'name',
setting_val => $new_thingy } );
}
}
my $name_now;
{
my $name_now = CDBI::THIS_TABLE->search(
{ setting => 'name' } )->next();
if ( !$name_now ) {
$name_now = "";
}
}
</%init>
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users