package MyApp::URLFetcher::NetFTP; use base qw/MyApp::URLFetcher/; use Net::FTP; sub get_url_to_str { my $self = shift; my $url = shift; # I don't know Net::FTP # either way, our interface is a bit harder to pull off # with Net::FTP # but this complexity will be in the software anyway # it's better to hide it here my $f = Net::FTP->new; # ... # ... $f->get("..."); }