Mercurial > repos > sarahinraauzeville > star
comparison GalaxyPath.pm @ 6:b7ed4ee33fb6 draft default tip
Deleted selected files
author | sarahinraauzeville |
---|---|
date | Mon, 09 Dec 2019 10:55:33 -0500 |
parents | c4fc8ff6e280 |
children |
comparison
equal
deleted
inserted
replaced
5:c4fc8ff6e280 | 6:b7ed4ee33fb6 |
---|---|
1 package GalaxyPath; | |
2 | |
3 use parent 'Config::IniFiles'; | |
4 | |
5 sub _convert_path{ | |
6 my ($path)=@_; | |
7 return $path if ($path=~/^\//); | |
8 return "$ENV{'MY_GALAXY_DIR'}/galaxy/$path"; | |
9 } | |
10 | |
11 sub my_path{ | |
12 my $self = shift; | |
13 my ($section,$item)=@_; | |
14 defined $ENV{'MY_GALAXY_DIR'} || die 'no MY_GALAXY_DIR environment variable defined'; | |
15 -e $ENV{'MY_GALAXY_DIR'} || die "$ENV{'MY_GALAXY_DIR'} path not found"; | |
16 return join(',',map{_convert_path($_)}split/,/,$self->val($section,$item)); | |
17 } | |
18 | |
19 1; |