use Commods;
use CommodsDatabase;
+our $self_url;
+our $base_url;
+
BEGIN {
use Exporter ();
our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
$VERSION = 1.00;
@ISA = qw(Exporter);
- @EXPORT = qw($dbh &db_setocean &db_connect &db_doall);
+ @EXPORT = qw($dbh &db_setocean &db_connect &db_doall
+ &ocean_list);
%EXPORT_TAGS = ( );
@EXPORT_OK = qw();
}
}
+my @ocean_list;
+
+sub ocean_list () {
+ if (!@ocean_list) {
+ my $fn= "$db_datadir/master-info.txt";
+ my $f= new IO::File $fn or die $!;
+ my @r;
+ while (<$f>) {
+ next unless m/^ocean\s+(\S.*\S)\s*$/;
+ push @r, $1;
+ }
+ $f->error and die $!;
+ close $fn;
+ @ocean_list= @r;
+ }
+ return @ocean_list;
+}
+
1;