choocroot has asked for the wisdom of the Perl Monks concerning the following question:
I would like to override the new() and accept() method of the IO::Socket::INET object in order to implement some basic "Access Control List" deny/allow rules.
I sucessfully made a preliminary IO::ACLSocket::INET package that inherit the IO::Socket::INET object and provide this ACL mechanism (add the rules when constructing the object with new(), or with addAllow()/addDeny() method, and automatically deny or allow the connection when calling accept()).
So, I would like to find a way to override directly the IO::Socket::INET methods in order to tranparently use these "ACL" socket with the HTTP::Daemon package for example, and anything that use IO::Socket::INET.
I can't rename my IO::ACLSocket::INET package to IO::Socket::INET, as it break everything, and I don't want to modify directly the whole .../IO/Socket/INET.pm file.
Is this possible ? What Perl mechanism should I use ?
Thanks.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Overriding/extending IO::Socket::INET methods
by Corion (Patriarch) on May 06, 2002 at 18:10 UTC |