Changeset 30347 for gs2-extensions/tdb/trunk/perllib/DBDrivers/GDBM.pm
- Timestamp:
- 2015-12-10T12:19:20+13:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/tdb/trunk/perllib/DBDrivers/GDBM.pm
r30342 r30347 29 29 use strict; 30 30 31 BEGIN 32 { 33 if (!defined $ENV{'GSDLHOME'} || !defined $ENV{'GSDLOS'}) { 34 die("Error! Environment not prepared. Have you sourced setup.bash?\n"); 35 } 36 } 37 31 38 # Libraries 32 39 use util; … … 47 54 $self->{'keyread_executable'} = 'gdbmkeys'; 48 55 $self->{'write_executable'} = 'txt2db'; 56 # Optional Support 49 57 $self->{'supports_set'} = 1; 50 58 bless($self, $class); … … 59 67 60 68 # Handled by BaseDBDriver 61 # sub get_infodb_file_path(string, string) 69 # sub get_infodb_file_path(string, string) => string 62 70 63 71 # Handled by 70HyphenFormat 72 # sub open_infodb_write_handle(string, string?) => filehandle 64 73 # sub close_infodb_write_handle(filehandle) => void 65 74 # sub delete_infodb_entry(filehandle, string) => void … … 72 81 # sub write_infodb_rawentry(filehandle, string, string) => void 73 82 74 75 ## @function open_infodb_write_handle(string, string*) => filehandle76 #77 # Handles legacy use of optional 'append' argument where '-append' is required78 #79 sub open_infodb_write_handle80 {81 my $self = shift(@_);82 my $infodb_file_path = shift(@_);83 my $opt_append = shift(@_);84 my $infodb_file_handle;85 if (defined $opt_append) {86 if ($opt_append eq 'append') {87 $opt_append = '-append';88 }89 $infodb_file_handle = $self->SUPER::open_infodb_write_handle($infodb_file_path, $opt_append);90 }91 else92 {93 $infodb_file_handle = $self->SUPER::open_infodb_write_handle($infodb_file_path);94 }95 return $infodb_file_handle;96 }97 ## open_infodb_write_handle(string, string*) => filehandle ##98 99 83 1;
Note:
See TracChangeset
for help on using the changeset viewer.