NAME
DBIx::Array::Session::Action - Ties DBIx::Array->{"action"} to the database
SYNOPSIS
use DBIx::Array;
my $dbx=DBIx::Array->new;
$dbx->connect($connection, $user, $pass, \%opt); #passed to DBI
$dbx->{"action"}="Main";
while ($this or $that) {
local $dbx->{"action"}="This or That Loop";
}
DESCRIPTION
This package ties the $dbx->{"action"} scalar to the database so that a local assignment to $dbx->{"action"} will set action twice. Once at the beginning and once at the end of the local variable scope.
USAGE
$dbx->action("Default");
{ #any block
local $dbx->{"action"}="block action";
#action is now "block action".
}
#action is now "Default" again.
foreach my $i (1 .. 5) {
local $dbx->{"action"}="Loop $i";
#action is now "Loop X".
}
#action is now "Default" again.
TIESCALAR
FETCH
Gets action from database
STORE
Sets Action in database
PROPERTIES
parent
my $parent=$self->parent; #isa L<DBIx::Array>
BUGS
Please open on GitHub
AUTHOR
Michael R. Davis
COPYRIGHT
MIT License
Copyright (c) 2023 Michael R. Davis