I'm working on a basic module that will make it super easy to work with the Nirvanix server. Here is some example code showing an upload and a simple file list. I have more than half of the functions in there only a few more to go and then I will put v0.1 up on cpan.
#!/usr/bin/perl
use strict;
use warnings;
use Nirvanix;
my $nirv = new Nirvanix('XXXXXXXXXXXXX ...... ');
if ($nirv->Login('ryan','testing')){
if (!$nirv->uploadFile('/home/ryan/jdk-6u2-linux-i586.rpm','/tmp/jdk-6u2-linux-i586.rpm')){
print $nirv->{error_message};
}
if ($nirv->list('/tmp')){
foreach my $file (@{$nirv->{'files'}}){
print $file->{'path'} . "\n";
}
}
else{
print $nirv->{error_message};
}
}
1;