[Israel.pm] DB_File + signals + modules

Itamar Elem elem at compugen.co.il
Mon Aug 29 03:43:31 PDT 2005


hi

I  have application which  have main + most of the code reside in module   
and use MLDBM(DB_File,DATA::Dumper)   to store/retrieve its data
I want to recover from the situation that someone  do CLRL+C  or something like that
because its left the DB_File  in  undefined state(the index and data is out of sync)
I never used signal before sow I need some info about it

1. where  to initiate the %SIG vector main/module or both?
2. what are necessary actions in the signal handler sub routines except to save the db to disk
3. if I connect to db   via  "$db=tie %h,"MLDBM",....";

is the following are equivalent:

   a. $db->sync
   b.  untie %h
        undef $db

thanks itamar





More information about the Perl mailing list