BioPerl
view release on metacpan or search on metacpan
Bio/DB/Registry.pm view on Meta::CPAN
Function: Looks for seqdatabase.ini files in the expected locations and
in the directories specified by $OBDA_SEARCH_PATH. If no files
are found download a default file from www.open-bio.org
Returns : nothing
Args : none
=cut
sub _load_registry {
my $self = shift;
eval { $HOME = (getpwuid($>))[7]; } unless $HOME;
if ($@) {
# Windows can have Win32::LoginName to get the Username, so check if it works before giving up
( defined &Win32::LoginName ) ? ( $HOME = Win32::LoginName() )
: $self->warn("This Perl doesn't implement function getpwuid(), no \$HOME");
}
my @ini_files = $self->_get_ini_files();
@ini_files = $self->_make_private_registry() unless (@ini_files);
my ($db,$hash) = ();
for my $file (@ini_files) {
open my $FH, '<', $file or $self->throw("Could not read file '$file': $!");
while( <$FH> ) {
if (/^VERSION=([\d\.]+)/) {
( run in 0.271 second using v1.01-cache-2.11-cpan-8d75d55dd25 )