Ignore:
Timestamp:
2008-06-06T11:04:57+12:00 (16 years ago)
Author:
mdewsnip
Message:

Adding "use strict", and fixing problems identified.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/GDBMUtils.pm

    r12844 r15890  
    11package GDBMUtils;
    22
     3use strict;
    34use util;
    45
    5 $debug = 0;
     6my $debug = 0;
    67
    78# /** Global variable to hold a string containing the last collection a gdbmGet
     
    4243      }
    4344    # Where's the database?
    44     $database = &getDatabasePath($collection);
     45    my $database = &getDatabasePath($collection);
    4546    # Are we in windows? Do we need .exe?
    46     $exe = "";
     47    my $exe = "";
    4748    $exe = ".exe" if $ENV{'GSDLOS'} =~ /^windows$/i;
    4849    # Retrieve the raw document content
    4950    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"`;
    5152    # Tidy up the ever growing number of newlines at the end of the value
    5253    $value =~ s/(\r?\n)+/$1/g;
     
    7374    my ($collection, $oid, $value) = @_;
    7475    # Where's the database?
    75     $database = &getDatabasePath($collection);
     76    my $database = &getDatabasePath($collection);
    7677    # Are we in windows? Do we need .exe?
    7778    my $exe = &util::get_os_exe();
     
    108109sub getDatabasePath()
    109110  {
    110     $collection = shift(@_);
     111    my $collection = shift(@_);
    111112    # Find out the database extension
    112113    my $ext = ".bdb";
Note: See TracChangeset for help on using the changeset viewer.