in reply to Extending Code By Changing the Base Class of an Object
Is there a way to extend Net::FTP so that it uses IO::Socket::SSL instead of IO::Socket::INET as its base class?You can subclass Net::FTP and override its port method to do what you want.
port() currently does the following:
In your subclass, implement port() so that it does everything exactly the same, but call IO::Socket::SSL->new() instead.
Update: Hmmm, actually that'll just SSLify the reverse connection back to the client (which won't even work because the server won't be expecting it ;).
You might be able to do something like:
-David
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Extending Code By Changing the Base Class of an Object
by cbeber (Initiate) on Sep 11, 2007 at 16:45 UTC |