Changeset 30370 for main/trunk/greenstone2/perllib
- Timestamp:
- 2016-01-12T11:00:53+13:00 (8 years ago)
- Location:
- main/trunk/greenstone2/perllib/DBDrivers
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/DBDrivers/70HyphenFormat.pm
r30355 r30370 46 46 use util; 47 47 use FileUtils; 48 use parent 'DBDrivers::BaseDBDriver'; 48 49 use DBDrivers::BaseDBDriver; 50 51 BEGIN { 52 @DBDrivers::70HyphenFormat::ISA = ('DBDrivers::BaseDBDriver'); 53 } 49 54 50 55 use constant { -
main/trunk/greenstone2/perllib/DBDrivers/BaseDBDriver.pm
r30355 r30370 528 528 529 529 530 ## @function531 #532 sub mergeDatabases533 {534 my $self = shift(@_);535 gsprintf(STDERR, (caller(0))[3] . " {common.must_be_implemented}\n");536 die("\n");537 }538 ## mergeDatabase(string, string) => integer ##539 540 530 1; -
main/trunk/greenstone2/perllib/DBDrivers/GDBM.pm
r30355 r30370 29 29 use strict; 30 30 31 # Libraries 32 use util; 33 use FileUtils; 34 use DBDrivers::70HyphenFormat; 35 36 31 37 BEGIN 32 38 { … … 34 40 die("Error! Environment not prepared. Have you sourced setup.bash?\n"); 35 41 } 42 @DBDrivers::GDBM::ISA = ('DBDrivers::70HyphenFormat'); 36 43 } 37 38 # Libraries39 use util;40 use FileUtils;41 use parent 'DBDrivers::70HyphenFormat';42 44 43 45 … … 50 52 $self->{'default_file_extension'} = 'gdb'; 51 53 # note: file separator agnostic 52 $self->{'executable_path'} = $ENV{'GSDLHOME'} . '/bin/' . $ENV{'GSDLOS'};54 $self->{'executable_path'} = FileUtils::filenameConcatenate($ENV{'GSDLHOME'}, 'bin', $ENV{'GSDLOS'}); 53 55 $self->{'read_executable'} = 'db2txt'; 54 56 $self->{'keyread_executable'} = 'gdbmkeys'; -
main/trunk/greenstone2/perllib/DBDrivers/GDBMTXTGZ.pm
r30355 r30370 32 32 use util; 33 33 use FileUtils; 34 # - OO inheritence 35 use parent 'DBDrivers::70HyphenFormat'; 34 use DBDrivers::70HyphenFormat; 35 36 BEGIN 37 { 38 @DBDrivers::GDBMTXTGZ::ISA = ('DBDrivers::70HyphenFormat'); 39 } 36 40 37 41 42 ## Constructor 38 43 sub new 39 44 { … … 43 48 $self->{'default_file_extension'} = 'txt.gz'; 44 49 # note: file separator agnostic 45 $self->{'executable_path'} = $ENV{'GSDLHOME'} . '/bin/' . $ENV{'GSDLOS'};50 $self->{'executable_path'} = &FileUtils::filenameConcatenate($ENV{'GSDLHOME'}, 'bin', $ENV{'GSDLOS'}); 46 51 $self->{'read_executable'} = 'gzip --decompress --to-stdout'; 47 52 $self->{'keyread_executable'} = $self->{'read_executable'}; -
main/trunk/greenstone2/perllib/DBDrivers/JDBM.pm
r30355 r30370 32 32 use util; 33 33 use FileUtils; 34 # - OO inheritence 35 use parent 'DBDrivers::70HyphenFormat'; 34 use DBDrivers::70HyphenFormat; 36 35 37 36 sub BEGIN … … 40 39 die("Error! Environment must be prepared by sourcing setup.bash\n"); 41 40 } 41 @DBDrivers::JDBM::ISA = ('DBDrivers::70HyphenFormat'); 42 42 } 43 43 … … 58 58 # Massage paths for Cygwin. Away to run a java program, using a binary that 59 59 # is native to Windows, so need Windows directory and path separators 60 # Note: this is done after the util::pathname_cat as that fuction can also 61 # (incorrectly) change file separators. 60 62 if ($^O eq "cygwin") { 61 63 $classpath = `cygpath -wp "$classpath"`;
Note:
See TracChangeset
for help on using the changeset viewer.