EasySessionEasySession is a Perl session interface. | |
Download |
EasySession Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- QIAN YU
- Publisher web site:
- http://search.cpan.org/~foolfish/EasyDBAccess-3.1.1/EasyDBAccess.pm
EasySession Tags
EasySession Description
EasySession is a Perl session interface. EasySession is a Perl session interface.SYNOPSIS use EasySession; if(defined(&EasySession::foo)){ print "lib is included"; }else{ print "lib is not included"; } #{"_sid" => "B43b648fd431aac32", "a" => 1, "b" => 2} print EasyTool::dump(create($dba,{a=>1,b=>2,c=>undef},{expire=>300})); $dba->execute('START TRANSACTION'); my $st=CORE::time(); for(1..10000){ create($dba,{a=>1,b=>2,c=>undef},{}); } print CORE::time()-$st; $dba->execute('COMMIT'); print EasyTool::dump(&delete($dba,{"_sid" => "43ba09e0abd5cf13", "a" => 1, "b" => 2})); print EasyTool::dump(&delete($dba,"43ba08a74fbe7afa")); print EasyTool::dump(&save($dba,{"_sid" => "43ba08a74fbe7afa", "a" => 1, "b" => 2,"c"=>3}));Basic Variables and FunctionsVariables $dba: instance of EasyDBAccess $rh : the hash_ref to store to database $session: $rh with key _sid $sid: session id ({8})({8}) $rc : affected rows 0 or 1 $rh_option: now => unix timestamp of now expire => expire time after last modify ip => ip address (int)Functions $session=create($dba,$rh,$rh_option); $session=load($dba,$sid,$rh_option); $rc =save($dba,$session,$rh_option); #if succ return 1,if fail(no row update) return 0 #if record exist, then update, else do nothing $rc =delete($dba , $sid|$session ); #if succ return 1,if fail(no row delete) return 0 #if record exist, then delete, else do nothing Requirements: · Perl
EasySession Related Software