Created Perl Module.

Last post 04-09-2008 7:06 PM by BarryR. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-12-2007 2:41 AM

    Created Perl Module.

    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;
     

  • 10-12-2007 6:39 PM In reply to

    • BarryR
    • Top 10 Contributor
    • Joined on 07-20-2007
    • San Diego
    • Posts 614

    Re: Created Perl Module.

    This looks great, let me know when you have it finished as I would be happy to give a cursory test to make sure everything is working and host any code in a contributors download section.

    Regards,
        Barry R.

    IM Support (Feel free to add me)

    MSN: barryruffner@msn.com
    Gmail: barryruffner@gmail.com
  • 04-04-2008 11:30 PM In reply to

    Re: Created Perl Module.

    I'd be interested in this too, however I don't find anything with "Nirvanix" when I search CPAN. I realize it's been some time since this thread was started.  Hopefully the OP is still around?

  • 04-09-2008 7:06 PM In reply to

    • BarryR
    • Top 10 Contributor
    • Joined on 07-20-2007
    • San Diego
    • Posts 614

    Re: Created Perl Module.

    While its not a full SDK we do have  some samples available in Perl located at the URL below.

     http://developer.nirvanix.com/files/folders/perl/default.aspx
     

    If you have any specific Perl problems please let us know so we can help.

    Regards,
         Barry R.

    IM Support (Feel free to add me)

    MSN: barryruffner@msn.com
    Gmail: barryruffner@gmail.com
    Filed under: , ,
Page 1 of 1 (4 items)