DBIx::Array::Session::Action - Ties DBIx::Array->{"action"} to the database
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"; }
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.
$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.
Gets action from database
Sets Action in database
my $parent=$self->parent; #isa L<DBIx::Array>
Please open on GitHub
Michael R. Davis
MIT License
Copyright (c) 2023 Michael R. Davis
DBIx::Array
To install DBIx::Array, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Array
CPAN shell
perl -MCPAN -e shell install DBIx::Array
For more information on module installation, please visit the detailed CPAN module installation guide.