Changeset 30344
- Timestamp:
- 2015-12-03T16:33:09+13:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/tdb/trunk/perllib/DBDrivers/GDBMTXTGZ.pm
r30339 r30344 33 33 use FileUtils; 34 34 # - OO inheritence 35 use parent 'DBDrivers:: GDBM';35 use parent 'DBDrivers::70HyphenFormat'; 36 36 37 37 … … 39 39 { 40 40 my $class = shift(@_); 41 my $self = DBDrivers:: GDBM->new();41 my $self = DBDrivers::70HyphenFormat->new(@_); 42 42 # Default TDB file extension 43 43 $self->{'default_file_extension'} = 'txt.gz'; … … 60 60 # Handled by 70HyphenFormat 61 61 # sub close_infodb_write_handle(filehandle) => void 62 # sub delete_infodb_entry(filehandle, string) => void63 62 # sub read_infodb_file(string, hashmap) => void 64 63 # sub read_infodb_keys(string, hashmap) => void … … 87 86 my $opt_append = shift(@_); 88 87 my $infodb_file_handle; 89 if (defined $opt_append) { 90 my $output_operator = '>'; # clobber 91 if ($opt_append eq "append") { 92 $output_operator = '>>'; # append 93 } 94 $infodb_file_handle = $self->open_infodb_write_handle($infodb_file_path, $output_operator); 88 # append 89 if (defined $opt_append && $opt_append =~ /^-?append$/) { 90 $infodb_file_handle = $self->SUPER::open_infodb_write_handle($infodb_file_path, '>>'); 95 91 } 92 # create or clobber 96 93 else { 97 $infodb_file_handle = $self-> open_infodb_write_handle($infodb_file_path);94 $infodb_file_handle = $self->SUPER::open_infodb_write_handle($infodb_file_path, '>'); 98 95 } 99 96 return $infodb_file_handle; … … 111 108 ## set_infodb_entry(string, string, hashmap) => void ## 112 109 110 113 111 1;
Note:
See TracChangeset
for help on using the changeset viewer.