http://www.perlmonks.org?node_id=23487


in reply to RE: Using Alarm to Handle Timing
in thread Using Alarm to Handle Timing

I'd considered making a global or package variable $timeout. It would be in scope for both the initialization and the signal handler.

What I'm trying to do is manage my Jellybean objects better. Some of them need to flush their caches every few minutes while others ought to sync data to storage every now and then. Using an internal cron-like feature seems to be pretty elegant, but I don't want to segfault randomly if it's avoidable.

  • Comment on (chromatic) RE: RE: Using Alarm to Handle Timing