Acme::State

Save application state on exit and restores state on startup
Download

Acme::State Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Scott Walters
  • Publisher web site:
  • http://search.cpan.org/~swalters/Math-Preference-SVD-0.01/lib/Math/Preference/SVD.pm

Acme::State Tags


Acme::State Description

Save application state on exit and restores state on startup Acme::State is a Perl module to save application state on exit and restores state on startup.SYNOPSIS use Acme::State; our $t; print "t: $t "; $t = int rand 100; print "new t: $t "; ... and then run it again.Crawls the package hierarchy looking for our variables. Stores them all off in a file in the home directory of the user running the script. When the script using this module starts up, this same file is read in and the variables are restored.Serializes scalars, hashes, and arrays declared using our, use vars, or otherwise not declared using my. Uses Storable to write the data. The save is placed in the home directory of the user the script is executing as. The file name is the same as the script's name ($0) plus ".save". It also keeps one backup around, named $0.save.last, and it may leave a $0.save.new if interrupted.Web apps written using Continuity get persistant state, so why shouldn't command line apps? Hey, and maybe Continuity apps want to persist some state in case the server implodes. Who knows.$Acme::State::wantcoderefs, if set true, takes things a step further and tells Acme::State to also serialize subroutines it finds. Nothing says fun like persisting coderefs from the stash and a 40 of Mickey's.This code reserves the right to die if anything goes horribly wrong. Requirements: · Perl


Acme::State Related Software