chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.web-live.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
source.tar.gz source download
[ypp-sc-tools.web-live.git]
/
yarrg
/
CommodsWeb.pm
diff --git
a/yarrg/CommodsWeb.pm
b/yarrg/CommodsWeb.pm
index 5e1520e22f45a3e0d3853f53e6523f1b370e6e5c..f82e09cb2de18fad2d1ec7db7a195516b9e4c264 100644
(file)
--- a/
yarrg/CommodsWeb.pm
+++ b/
yarrg/CommodsWeb.pm
@@
-43,20
+43,30
@@
BEGIN {
our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
$VERSION = 1.00;
@ISA = qw(Exporter);
our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
$VERSION = 1.00;
@ISA = qw(Exporter);
- @EXPORT = qw(&dbw_connect &ocean_list);
+ @EXPORT = qw(&dbw_connect &ocean_list
$sourcebasedir
);
%EXPORT_TAGS = ( );
@EXPORT_OK = qw();
}
our $datadir='.';
%EXPORT_TAGS = ( );
@EXPORT_OK = qw();
}
our $datadir='.';
+our $sourcebasedir;
for my $dir (@INC) {
if ($dir =~ m/\.perl-lib$/) {
for my $dir (@INC) {
if ($dir =~ m/\.perl-lib$/) {
- $datadir= "$dir/DATA";
+ $sourcebasedir= "$dir/..";
+ if (stat "$dir/DATA") {
+ $datadir= "$dir/DATA";
+ } elsif ($!==&ENOENT) {
+ $datadir= "$dir";
+ } else {
+ die "stat $dir/DATA $!";
+ }
last;
}
}
last;
}
}
+defined $sourcebasedir or
+ die "no source base dir in @INC";
my @ocean_list;
my @ocean_list;