Bio-Glite

 view release on metacpan or  search on metacpan

lib/Bio/Glite.pm  view on Meta::CPAN

        puts
        readFile
        writeFile
);

our $VERSION = '0.10';

# Preloaded methods go here.

my $prefix  = 'http://rest.g-language.org/';
my $upload  = $prefix . 'upload/upl.pl';
my $ua = LWP::UserAgent->new;

sub load {
    my $this = {};

    $_[0] =  $ua->post($upload, 'Content_Type'=>'form-data', 'Content'=>['file'=>[$_[0]]])->content if(-e $_[0]);

    foreach my $line (split(/\n/, $ua->get($prefix . $_[0] . '/disclose')->content)){
	my ($feat, $key, $val) = split(/\t/, $line);
	if(length $val){
	    $this->{$feat}->{$key} = $val;
	}else{
	    $this->{$feat} = $key;
	}
    }



( run in 2.928 seconds using v1.01-cache-2.11-cpan-b16cb0d3907 )