Changeset 15890 for gsdl/trunk/perllib/GDBMUtils.pm
- Timestamp:
- 2008-06-06T11:04:57+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/GDBMUtils.pm
r12844 r15890 1 1 package GDBMUtils; 2 2 3 use strict; 3 4 use util; 4 5 5 $debug = 0;6 my $debug = 0; 6 7 7 8 # /** Global variable to hold a string containing the last collection a gdbmGet … … 42 43 } 43 44 # Where's the database? 44 $database = &getDatabasePath($collection);45 my $database = &getDatabasePath($collection); 45 46 # Are we in windows? Do we need .exe? 46 $exe = "";47 my $exe = ""; 47 48 $exe = ".exe" if $ENV{'GSDLOS'} =~ /^windows$/i; 48 49 # Retrieve the raw document content 49 50 print STDERR "#Get document\ncmd: gdbmget$exe \"$database\" \"$oid\"\n" if $debug; 50 $value = `gdbmget$exe "$database" "$oid"`;51 my $value = `gdbmget$exe "$database" "$oid"`; 51 52 # Tidy up the ever growing number of newlines at the end of the value 52 53 $value =~ s/(\r?\n)+/$1/g; … … 73 74 my ($collection, $oid, $value) = @_; 74 75 # Where's the database? 75 $database = &getDatabasePath($collection);76 my $database = &getDatabasePath($collection); 76 77 # Are we in windows? Do we need .exe? 77 78 my $exe = &util::get_os_exe(); … … 108 109 sub getDatabasePath() 109 110 { 110 $collection = shift(@_);111 my $collection = shift(@_); 111 112 # Find out the database extension 112 113 my $ext = ".bdb";
Note:
See TracChangeset
for help on using the changeset viewer.