![]() |
|
go ahead... be a heretic | |
PerlMonks |
Re: Extending Code By Changing the Base Class of an Objectby erroneousBollock (Curate) |
on Sep 11, 2007 at 16:13 UTC ( #638347=note: print w/replies, xml ) | Need Help?? |
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.
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
In Section
Seekers of Perl Wisdom
|
|