Next | Tricks of the Wizards | 200 |
package Errno;
sub ENOENT () { 2 } sub EACCES () { 13 } sub ENOTDIR () { 20 } # ... many more ...
sub TIEHASH { bless [] } # Dummy object
sub FETCH { my ($self, $errname) = @_; return $! == &$errname; }
sub STORE { croak("ERRNO hash is read only!"); }
This was invented by Tom Christiansen and implemented by Graham Barr.
Next | Copyright © 2003 M. J. Dominus |