Hello Mooseketeers!

I'm relatively new to Moose - I've built a nice Moose based app that I use 
in production.

Now, I want to do something more complex.  I want to abstract an interface 
(or similar) so that I can transfer files via FTP, SFTP or SCP (maybe even 
just "cp").

To make it simple, I'd like to implement only a few of the methods - those 
around fetching files off some remote system where the protocol varies.

The "get" type interfaces of all of these remote systems are very similar:
   connect
   authenticate
   ls
   get

The attributes are also very similar:
   Host
   User
   Passwd
   RemoteDir

So it seems I have many choices under the Moose umbrella:
   Roles
   Subclasses
   SubTypes
   Interface
   Others?

The downline classes (Net::FTP, Net::SSH2) are obviously not Moose classes.
But I can imagine my driver program looking extremely simple:

my $remote_sys = MyAPP::Remote->new($attr_hash);
$remote_sys->connect();
$remote_sys->authenticate();
$remote_sys->ls();
$remote_sys->get();

I've read many fine articles about all the various features and possible 
ways of coding such a critter.  I've also been through many articles 
warning of how to "not" do things ;-)

Could someone suggest a high level direction?
I'd be happy to post my final example once I have it.

Thanks!!

--Dan

Reply via email to