GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Alarm::_TieSIG(3) User Contributed Perl Documentation Alarm::_TieSIG(3)

Alarm::_TieSIG - Module handling tying of %SIG for alarm extensions.

This is an internal utility module for use with the Alarm::* alarm extensions, that handles tying of the Perl built-in variable %SIG. This is deep magic and you use this module at your own risk.

To use this class, simply "use" it and then call the "Alarm::_TieSIG::tiesig()" function. This replaces %SIG with a dummy tied hash.

Whenever the new %SIG is accessed, this class checks to see if the requested key is ALRM. If so, it calls "sethandler()" for STORE's, and "gethandler()" for FETCHes. You must provide both of these methods in your package.

All other operations are passed on to the original, magic %SIG.

Note: Do not call "tiesig()" more than once. Doing so produces a warning and no other effects.

The following code will disable, with warnings, attempts to set SIGALRM handlers in your program (although it's not impossible to get past if someone really wanted to):

  use Alarm::_TieSIG;
  Alarm::_TieSIG::tiesig();

  sub sethandler {
    warn "\$SIG{ALRM} has been disabled.\n";
  }

  sub gethandler {
    warn "\$SIG{ALRM} has been disabled.\n";
  }

This module is not guaranteed to work. In fact, it will probably break at the most inconvient time. If this module breaks your program, destroys your computer, ruins your life, or otherwise makes you unhappy, do not complain (especially not to me). It's your own fault.

Written by Cory Johns (c) 2001.
2004-05-11 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.