Apache-Session
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Apache/Session/Store/DBI.pm view on Meta::CPAN
$self->{insert_sth}->bind_param(1, $session->{data}->{_session_id});
$self->{insert_sth}->bind_param(2, $session->{serialized});
$self->{insert_sth}->execute;
$self->{insert_sth}->finish;
}
sub update {
my $self = shift;
my $session = shift;
$self->connection($session);
local $self->{dbh}->{RaiseError} = 1;
if (!defined $self->{update_sth}) {
$self->{update_sth} =
$self->{dbh}->prepare_cached(qq{
lib/Apache/Session/Store/DB_File.pm view on Meta::CPAN
}
}
if (exists $self->{dbm}->{$session->{data}->{_session_id}}) {
die "Object already exists in the data store";
}
$self->{dbm}->{$session->{data}->{_session_id}} = $session->{serialized};
}
sub update {
my $self = shift;
my $session = shift;
if (!tied %{$self->{dbm}}) {
my $rv = tie %{$self->{dbm}}, 'DB_File', $session->{args}->{FileName};
if (!$rv) {
die "Could not open dbm file $session->{args}->{FileName}: $!";
}
}
lib/Apache/Session/Store/File.pm view on Meta::CPAN
my $file = $directory.'/'.$session->{data}->{_session_id};
sysopen ($self->{fh}, $file, O_RDWR|O_CREAT) ||
die "Could not open file $file: $!";
$self->{opened} = 1;
print {$self->{fh}} $session->{serialized};
$self->{fh}->flush();
}
sub update {
my $self = shift;
my $session = shift;
my $directory = $session->{args}->{Directory} || $Apache::Session::Store::File::Directory;
if (!$self->{opened}) {
my $file = $directory.'/'.$session->{data}->{_session_id};
sysopen ($self->{fh}, $file, O_RDWR|O_CREAT) ||
die "Could not open file $file: $!";
lib/Apache/Session/Store/Sybase.pm view on Meta::CPAN
local $self->{dbh}->{RaiseError} = 1;
my $sth = $self->{dbh}->prepare( qq{
INSERT INTO sessions (id, a_session) VALUES ( }.$self->{dbh}->quote($session->{data}->{_session_id}).qq{, }.$self->{dbh}->quote($session->{serialized}).qq{ ) } );
$sth->execute( );
}
sub update {
my $self = shift;
my $session = shift;
$self->connection( $session );
local $self->{dbh}->{RaiseError} = 1;
my $sth = $self->{dbh}->prepare( qq{
UPDATE sessions SET a_session = }.$self->{dbh}->quote($session->{serialized}).qq{ WHERE id = }.$self->{dbh}->quote($session->{data}->{_session_id}) );
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.140 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )