NAME
HackaMol::Roles::FileFetchRole - Role for using LWP::Simple to fetch files from www
VERSION
version 0.025
SYNOPSIS
use HackaMol;
my $pdb = $HackaMol->new->get_pdbid("2cba");
print $pdb;
DESCRIPTION
FileFetchRole provides attributes and methods for pulling files from the internet. Currently, the Role has one method and one attribute for interacting with the Protein Database.
METHODS
get_pdbid
fetches a pdb from pdb.org and returns the file in a string.
getstore_pdbid
arguments: pdbid and filename for writing (optional). Fetches a pdb from pdb.org and stores it in your working directory unless {it exists and overwrite(0)}. If a filename is not passed to the method, it will write to $pdbid.pdb. use get_pdbid to return contents
ATTRIBUTES
overwrite
isa lazy ro Bool that defaults to 0 (false). If overwrite(1), then fetched files will be able to overwrite those of same name in working directory.
pdbserver
isa lazy rw Str that defaults to http://pdb.org/pdb/files/
SEE ALSO
AUTHOR
Demian Riccardi <demianriccardi@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2015 by Demian Riccardi.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.