Debian Codegraph @

Changes

raw
1
2 Revision history for Perl extension XBase and DBD::XBase.
3
4 1.08 Fri Jan 13 21:20:15 CET 2017
5 Add support for dBASE IV memo type B.
6
7 1.07 Tue May 3 19:45:23 CEST 2016
8 Resolving the xbase_lines regression of 1.06.
9
10 1.06 Sun Mar 6 20:48:11 CET 2016
11 Add support for W column type (byte array by Visual FoxPro).
12
13 Fixed overload arg warning.
14
15 Restore the table_info functionality.
16
17 Fix for type B little endian issue, reported by Andres Thomas.
18
19 1.05 Wed Apr 24 19:37:09 CEST 2013
20 Fix for prepare_select_eq and empty MDX indexes, patch by Julian
21 Bridle.
22
23 1.04 Wed Apr 17 19:47:21 CEST 2013
24 Fix for handling MDX indexes, patch by Julian Bridle.
25
26 1.03 Sun Mar 6 07:32:21 CET 2011
27 Fixing output of tests when DBI is not available.
28
29 1.02 Thu Mar 3 20:40:54 CET 2011
30 Added the URL to the AVAILABLE FROM sections.
31
32 1.01 Wed Feb 9 21:22:07 CET 2011
33 Updated the Changes file.
34
35 1.00 Wed Feb 9 21:19:35 CET 2011
36 Changed the location of the distribution to
37 http://www.adelton.com/perl/DBD-XBase/
38
39 Changed author's email address.
40
41 Require perl 5.10 and use O_BINARY from Fcntl.
42
43 Updated the clean target to make distclean clean.
44
45 Updated URL of Erik's documentation.
46
47 0.241 Thu Nov 20 21:12:56 MET 2003
48 XBase: codepage option to XBase->create added, suggested by
49 Chris Greenhill.
50
51 0.240 Mon Aug 25 15:03:57 MEST 2003
52 XBase: delete_record/undelete_record now corrctly returns
53 false when the delete fails, problem reported by Boris Kocak.
54
55 0.234 Mon Jul 7 20:41:14 CEST 2003
56 Added test to Makefile.PL and note to INSTALL about case
57 insensitive clash with Xbase.pm, suggested by Michael Higgins
58 and Jan from AS.
59
60 Added documentation / comments about datetime, suggested
61 by John Freed.
62
63 Xbase: Added the recompute_lastrecno parameter, suggested by
64 Kevin J. Rice. Added EOF to create, suggested by Ilya Sandler.
65
66 0.232 Thu Apr 3 17:47:39 CEST 2003
67 XBase::SQL: Fieldname can contain the table name (silently
68 dropped), suggested by Michael Semich, and table name now
69 matches [^\(\s]+ to allow paren immediately following it,
70 problem reported by belg4mit.
71
72 0.231 Thu Oct 31 17:48:19 MET 2002
73 t/9_dbd_create.t: patched a test failure on Windows platform,
74 path by Yves Orton.
75
76 0.230 Wed Oct 9 11:05:28 MET DST 2002
77 DBD::XBase: added docs about xbase_ignorememo.
78
79 DBD::XBase: fixed dropping table so that the driver forgets
80 the table, patch by Mike P. Mikhailov.
81
82 0.220 Mon Sep 2 12:26:34 MET DST 2002
83 XBase::Index::ntx: type option has higher priority than dbf.
84
85 XBase::read_header: fail if the header is not valid.
86
87 XBase::Memo::read_header: allow length 512 and 24.
88
89 XBase::FAQ: reformatted, slightly.
90
91 XBase, XBase::SQL: added support for type money (Y).
92
93 Code and indentation cleanup.
94
95 0.210 Fri Dec 7 12:56:37 MET 2001
96 README and INSTALL made uptodate.
97 Fixed attributes (TYPE) handling, problem reported by Jacek
98 Ciolek.
99
100 0.200 Sun Aug 19 13:48:27 MET DST 2001
101 Source code reformated to unified indentation.
102
103 0.190 Sat Aug 18 18:02:04 MEST 2001
104 XBase::SDBM: documentation added.
105
106 DBD::XBase: order by with more fields supported.
107
108 0.177 Thu May 10 17:19:07 MET DST 2001
109 XBase: retry with nolongchars if the char lengths do not match
110 the record length.
111
112 Memo field not written when empty, suggested by Sascha Knific.
113
114 XBase::Base::open: now allows option 'fh' to point to
115 IO::Scalar or generally any filehandle to be passed in.
116
117 0.176 Thu Feb 8 13:19:16 MET 2001
118 DBD::XBase: select * with order by was failing, reported by
119 Filipe Luis Geschaeft
120
121 0.173 Tue Feb 6 11:18:46 MET 2001
122 XBase: year encoding not correct in dbf header, reported
123 by Helmut Jarausch.
124
125 0.172 Tue Feb 6 10:22:11 MET 2001
126 XBase::Memo: creating of fpt supported; bug pointed out by
127 Massimo Matteuzzi.
128
129 0.170 Fri Jan 26 18:35:01 MET 2001
130 XBase::idx: create support and better reading support.
131
132 XBase: password protection explored
133
134 0.165 Mon Jan 22 19:33:01 MET 2001
135 XBase: better sanity checks in dump_records.
136
137 XBase::SQL: added support for not in SQL command.
138
139 0.162 Sun Jan 21 17:53:05 MET 2001
140 XBase::IndexCursor: error by one in last_fetched.
141
142 XBase: Y2K problem fixed, patch by Phillip Millman.
143
144 XBase::Index, XBase::SDBM: added support for SDBM index
145 files.
146
147 XBase, XBase::cdx: added support for type specification of cdx
148 files even when called via prepare_select_with_index, to
149 allow use even if we don't support expressions.
150
151 XBase::SQL: multiplication support added, patch by Thoren
152 Johne and Stuart Lemmen.
153
154 0.161 Sat May 20 12:52:35 MET DST 2000
155 indexdump: had bug in option handling.
156
157 XBase::Index: minor tweaks, bug reporting fixed, support
158 for cdx dates added, reported by Dan Albertsson.
159
160 XBase: long numeric values weren't truncated correctly,
161 reported by Dan Albertsson.
162
163 0.160 Sat Feb 12 20:03:56 MET 2000
164
165 XBase::Index: cdx now supports the delete, insert and
166 write_header methods for updating the index file. Handling
167 of negative integers fixed, as well as trailing nulls.
168
169 XBase: preliminary support for attach_index. Code for
170 making the module happy with _NULLFLAGS/0 type (we do not
171 interpret this at the moment, we just correctly ignore)
172 provided by Sebastien Nameche.
173
174 XBase::SQL: like operator now matches multiline strings as
175 well, problem reported by Petr Nalevka.
176
177 DBD::XBase: stump DBD::XBase::db::DESTROY added, to silence DBI,
178 patch by Gregory McCann.
179
180 0.1551 Sat Jan 9 19:21:16 CET 2000
181
182 dbfdump: Accepts --SQL modifier to --info, prints structure
183 of the table as a create table SQL.
184
185 0.155 Sun Nov 7 15:43:59 CET 1999
186
187 XBase::SQL and DBD::XBase: arbitraty arithmetic expression
188 possible in the select list. NAME attribute works fine for them.
189 SQL functions length, *trim, concat and substr supported. Fixed
190 bug in XBase::SQL causing bad division results. The DBD::XBase
191 documentation revised.
192
193 t/5_dbd_select* tests extended.
194
195 0.147 Mon Aug 16 10:48:37 MET DST 1999
196
197 XBase::SQL and DBD::XBase: fixed broken handling of NAME
198 attribute, introduced in 0.145 by an attempt to support
199 arbitrary expressions in the selected part. So I rolled back
200 that change and it's (again) only possible to select * or
201 select list of field names -- problem reported by adelton,
202 William McKee and Martin Treusch.
203
204 XBase::Index: fixed handling of indexes with 32-bit record
205 number -- patch by Jon Bloom.
206
207 XBase::Base: fixed typo _unlockex, pointed by Mike Sanders.
208
209 0.145 Mon Jun 21 12:49:19 MET DST 1999
210
211 DBD::XBase: updated TYPE_INFO for BOOLEAN and BLOB.
212
213 t/5_dbd_select.t: added tests for the named bind params.
214
215 0.144 Fri May 14 07:50:23 CEST 1999
216
217 XBase::SQL, DBD::XBase: added support for named bind parameters;
218 added comments.
219
220 0.141 Thu Apr 29 23:17:25 CEST 1999
221
222 XBase::Index: added code for multiple page cdx and fix for big
223 endian. Added code for negative ntx numeric values.
224
225 0.140 Thu Apr 29 10:50:58 MET DST 1999
226
227 XBase: the -1 memo records handle the 4 byte fields as well,
228 patch by Zbigniew Malinowski.
229
230 XBase::Index: support for cdx files improved (numeric fields),
231 subindexes.
232
233 XBase::SQL: code properly commented.
234
235 DBD::XBase: added the time type, aptch by Nikolai Saoukh.
236
237 0.132 Sun Apr 18 17:35:10 MET DST 1999
238
239 XBase::Base: dealing of openoptions fixed, problem spotted by
240 Zbigniew Malinowski.
241
242 XBase::SQL: added type numeric, patch by Nikolai Saoukh.
243
244 XBase::Index: added support for cdx (one page index so far),
245 added support for idx (untested).
246
247 DBD::XBase: added attributes PRECISION and SCALE, changed SQL
248 type for NUMERIC, patch by Nikolai Saoukh.
249
250 driver_characteristics now includes Tim's additions of Apr 4,
251 1999.
252
253 Created new XBase::FAQ.pod.
254
255 0.131 Sun Apr 18 8:47:12 MET DST 1999
256
257 XBase: memo records marked -1 are returned empty now,
258 spotted by Zbigniew Malinowski.
259
260 XBase::SQL: added possibility to have expression to the left
261 from the relational operator, suggested by Nikolai Saoukh.
262
263 DBD::XBase: fixed type_info to return array, bug spotted by
264 Alan Grover.
265
266 0.130 Sat Feb 27 18:09:04 MET 1999
267
268 DBD::XBase: fixed handling of the rows method.
269
270 Added driver_characteristics.pod to list characteristics of
271 DBD::XBase according to the draft by Tim Bunce.
272
273 0.129 Fri Feb 26 22:02:12 MET 1999
274
275 XBase.pm: added support for datetime fields T, testing data
276 provided by William McKee. Fix for ignorememo.
277
278 XBase::SQL: added time and datetime names to the SQL parser.
279
280 XBase::Memo and XBase.pm: added support for Apollo SMT memo
281 files, code based on that provided by Dirk Tostmann.
282
283 O_BINARY is only loaded on evil systems now.
284
285 0.127 Mon Feb 22 10:56:23 MET 1999
286
287 XBase::Base: opening readonly files fixed, patch by Petr
288 Machacek.
289
290 _unlockex fixed to _unlock. locksh, lockex and unlock now
291 return true/false based on result.
292
293 DBD::XBase::disconnect now closes the tables, patch by Martin
294 Treusch von Buttlar. Fixed typo in delete code.
295
296 t/2_write.t: added $table->close before size check, patch by
297 Ilya Chelpanov.
298
299 0.121 Thu Jan 21 20:07:04 MET 1999
300
301 XBase::Memo: fixed a typo in measuring the next_for_append,
302 pointed out by Dan Albertsson.
303
304 t/2_write.t: added afox5.dbf/FPT and a Fox* test.
305
306 0.120 Wed Jan 13 13:24:15 MET 1999
307
308 XBase.pm: added XBase::Cursor::rewind, names,
309 prepare_select_nf. Added readonly option. Added option 'table'
310 for dump -- using Data::ShowTable.
311
312 XBase.pm, XBase::Base.pm: open method now accepts hash of
313 options.
314
315 XBase::Memo: we now reset next_for_append to point behind the
316 end of the file, problem pointed out by Artem Belevich.
317
318 dbfdump: option --table, --fields now handles intervals.
319
320 t/2_read.t: fixed problem with order of fields in hash, patch
321 by Andreas J. Koenig.
322
323 t/4_dbfdump.t: added quotes for Win* systems, patch by Randy
324 Kobes.
325
326 0.115 Wed Jan 6 17:02:28 MET 1999
327
328 XBase::Memo: tries to find out which format (\x1a versus
329 \x1a\x1a) to use for dBaseIII memo files. It also writes back
330 this separator.
331
332 0.110 Sun Dec 20 21:29:05 MET 1998
333
334 XBase::SQL: added LIKE clause to WHERE part of SQL commands.
335
336 0.105 Sun Dec 20 17:09:43 MET 1998
337
338 XBase::Base: added workaround for systems that not only write
339 to files something else than they are told to, but also damage
340 the files by merely opening it.
341
342 XBase::Memo: fixed problem with fpt files -- thanks to Dan
343 Albertsson for providing many test files.
344
345 XBase::SQL: fix of handling of double quoted strings.
346
347 dbfdump: memosep and memofile options fixed.
348
349 t/4_dbfdump.t: avoided using cat.
350
351 t/*_dbd_*.t: forcing use of DBI version at least 1.0.
352
353 0.100 Mon Dec 7 11:00:23 MET 1998
354
355 DBD::XBase: capitalized AND/OR in SQL commands now work,
356 method rows implemented, reported by cybertoast. Updated to
357 use _set_fbav. Unpolished support to *info* methods.
358
359 XBase::SQL: fixed the primary key/key parsing problem, patch
360 by Bill Brinkley & Joe Johnston. A quick fix to avoid bug in
361 Perl with long blobs.
362
363 XBase::Memo: fixed appending record to dBaseIV memo used to
364 corrupt the data -- reported by Dan Albertsson.
365
366 0.0696 Mon Oct 26 11:57:01 MET 1998
367
368 DBD::XBase: added bug reporting by INSERT command and fixed
369 example in man page, spotted by Dmitry Dorofeev. Added DESC
370 part of ORDER BY clause, requested by Dmitry Dorofeev. Fixed
371 number of fields returned with ORDER BY clause, patch by
372 Paul Lindner. If the directory is not specified in call to
373 connect, it now defaults to current directory, not to root.
374 Fixed the fetch method -- it doesn't deadlock anymore, problem
375 reported by Ken Yamaguchi.
376
377 XBase::Index: added some MDX code.
378
379 XBase::Memo: header_len is now set to block_size, not 512,
380 patch by Fergus Lee.
381
382 XBase.pm: The type B is Fox double, not memo, spotted by
383 George F. Frazier. Added support for Fox* 4 byte memo fields,
384 data provided by William McKee.
385
386 All of the reads/tells rewritten to allow stream-lined processing,
387 suggested by Sergey Lukashevich. Use with caution, however.
388
389 Added autoflush to each opened file, so it's safe to read the
390 table with other process before closing the table in the first
391 one, spotted by Thomas Hahn.
392
393 0.0694 Tue Aug 25 23:24:35 MET DST 1998
394
395 XBase::Memo: Fixed error by 8 in dBaseIV reading/writing
396 code, bug reported by Kendal Van Dyke.
397
398 t/5_dbd_select.t changed to be non-unique-key in sort
399 independent, reported by Larry W. Virden.
400
401 0.0693 Tue Aug 25 10:25:20 MET DST 1998
402
403 DBD::XBase: Fixed handling ORDER BY with WHERE clauses,
404 reported by Kendal Van Dyke.
405
406 XBase: added nolongchars -- omitted from 0.068.
407
408 XBase::Index: added ro support for Clipper's ntx, the whole
409 module reworked. Thanks to Frans van Loon for providing
410 example ntx files and code that helped me to understand the
411 format. Also thanks to Robert Geer for his C code that also
412 helps me to check the expected results.
413
414 XBase::Base: last_record can be -1, meaning unknown --
415 disables checks.
416
417 Added t/3_ntx.t and added ORDER BY test to t/5_dbd_select.t.
418
419 Some documentation improvements.
420
421 0.068 Thu Aug 20 18:43:17 MET DST 1998
422
423 DBD::XBase: added support for ORDER BY, defined using substh.
424
425 Fixed error by 1 in deleting all records.
426
427 Added support for NULLABLE, NUM_OF_PARAMS and TYPE in FETCH.
428
429 Defined data_sources to dbi:XBase:.; disconnect_all returns 1;
430 defined tables, disconnect and DESTROY; quote adds support for
431 NULL.
432
433 XBase: create now marks presence of a dbt file in dbf.
434
435 Added attribute nolongchars to disable character fields longer
436 than 255.
437
438 Erik Bachmann's homepage moved.
439
440 XBase::Memo: added suport for memosep attribute, default
441 \x1a\x1a. Correct header is now written for dBaseIV memo
442 files.
443
444 Fix of handling dBaseIV memo records, patch by Barry Fishman.
445
446 XBase::SQL: added ORDER BY support, recognizes VARCHAR.
447
448 In dbit/40blobs.t we only try blob size 64 -- fix for bug in
449 Perl regexp engine. Change in dbit/40bindparam.t, quick fix
450 for missing NULL chars. In dbit/50chopblanks.t swapped
451 $$ref[1] and $name.
452
453 0.065 Sun Jun 7 15:18:57 MET DST 1998
454
455 Added table specific ChopBlanks. Added fetch_hashref to
456 XBase::Cursor.
457
458 Docs updated.
459
460 0.064 Sun May 31 18:56:26 MET DST 1998 (*****)
461
462 Major rewrite of the DBD and SQL part. New features:
463 support for bind parameters in where, insert and update.
464 Support for NULL and IS NULL tests. The XBase::SQL is faster
465 and hopefully clearer. The DBD::XBase supports (among others)
466 bind_col. The DBD driver now passes 98.39 % of the standard
467 DBD tests.
468
469 Added support for data type 'I' for Fox* into XBase.pm.
470
471 0.0632 Wed May 27 12:27:04 MET DST 1998
472
473 Added --nomemo option to dbfdump. The list of entires is made
474 longer in any non-leaf page in ndx. Added check for the magic
475 "FFFF0800" tag in dBaseIV dbt file when reading it.
476
477 0.0631 Fri May 22 22:24:02 CEST 1998
478
479 Fixed handling big endian in numeric fields in ndx, fixe
480 problem with key/record length.
481
482 0.063 Sun May 17 21:46:08 CEST 1998
483
484 Added first support for ndx index files. From XBase module
485 it's available using prepare_select_with_index. It's very
486 alpha but it seems to handle character and numeric (not date
487 yet) types. And yes, it's read only.
488
489 Added FETCH('NAME') and _ListTables to DBD::XBase, added drop
490 table, integer type and dummy not null to XBase::SQL. The
491 generic DBI test suite now goes well up until bind params, put
492 on ToDo list.
493
494 0.062 Thu May 14 15:11:32 MET DST 1998
495
496 Field and table names in XBase::SQL now accept digits and
497 underscores, in XBase::Memo, we check for
498 ($dbf_version & 15), patches by Jens Quade.
499
500 Fixed handling of Fox* fpt files and a problem with memo
501 files that have record length different than 512, patches
502 by Thomas Grueter.
503
504 0.061 Tue Apr 7 21:52:07 MET DST 1998
505
506 Fixed writing undefined values in numeric fields.
507 Fixed dealing with uppercase extensions.
508
509 XBase::SQL fixed to support int, found by Chris Winters.
510
511 Offset in the record headers in dbf now set properly, patch by
512 Dave Frascone.
513
514 Added ignorememo option to new XBase call. Use this if you
515 have a memo field in dbt but do not have the memo file.
516 Otherwise you will get an error, request by Martin Jost.
517 Other fixes by Martin Jost included.
518
519 0.060 Fri Mar 20 10:20:45 MET 1998
520
521 Added method prepare_select and XBase::Cursor to implement
522 long selects. Method dump_records now prints directly,
523 doesn't use get_all_records.
524
525 Added parameter --info into the script dbfdump to print the
526 header info.
527
528 Changed way of determining the type of the dbt file after
529 discussion with Sergey Lukashevich.
530
531 0.0599 Wed Mar 11 22:58:45 MET 1998
532
533 Option to specify the memo file in call to XBase::new added.
534
535 Dump_records made customizable.
536
537 0.0598 Tue Mar 10 22:40:00 MET 1998
538
539 Fixed bug when finding a name for the memo file in XBase; in
540 dBaseIII memo field we will only check for one \x1a to allow
541 as many formats possible, we still write two of them; typo in
542 init_memo fixed -- patches by Martin Jost.
543
544 0.0597 Tue Mar 3 23:40:56 MET 1998 (*****)
545
546 Major code revision and check:
547
548 Error handling fixed, locking added. Rewritten process_* to
549 rproc and wproc arrays.
550
551 Added read_all_records. Minor typos and bugs fixed.
552
553 Test suite extended.
554
555 0.0584 Mon Mar 2 10:04:00 MET 1998
556
557 Fix of XBase::Memo::dBaseIV::read_record for memo fields
558 longer than record length by Jochen Friedrich.
559
560 0.0583 Thu Feb 12 00:08:07 MET 1998
561
562 Bug fix for floating fields, patch by Carlos Augusto de
563 Almeida.
564
565 0.058 Mon Feb 9 19:15:03 MET 1998 (*****)
566
567 XBase::SQL rewritten, DBD::XBase now supports select, delete,
568 insert, update and create table. Documentation for DBD::XBase
569 extended. DBD::XBase is still alpha but rather stable.
570
571 Added support for fpt memo files.
572
573 Fixed bug with dBase IV memo files, the block length is stored
574 somewhere else, patch by James LewisMoss. Fixed bug with field
575 names in newer dbf files, terminated by zero byte, patch by Petr
576 Olsak. Added binmode for the OSes that write to disk something
577 else that they are told to, reported by Robert Bauer. Removed
578 the test that caused read to fail on read-only files, reported
579 by Stewart Russell.
580
581 The error handling reviewed, most of the error messages are
582 now local to the object ($table->errstr()).
583
584 0.039 Wed Dec 17 19:53:49 MET 1997 (*****)
585
586 DBD::XBase supports select where and delete where.
587
588 0.0352 Mon Dec 15 11:29:46 MET 1997
589
590 Fixed bug with long memo fields, reported by Tejinderpal
591 Singh.
592
593 0.0345 Mon Dec 8 13:02:46 MET 1997
594
595 Fixed bug with "\0" at the end of field names in header,
596 spotted by Roberto Congiu.
597
598 0.0343 Thu Dec 4 10:52:41 MET 1997
599
600 Column names are converted to uppercase. SQL parsing moved to
601 XBase::SQL module. Added require XBase::Memo when creating new
602 Memo file. Added test for create and drop.
603
604 0.0342 Fri Nov 28 18:30:31 MET 1997
605
606 Fixed bug when creating new file, spotted by Roberto Congiu.
607 $XBase::errstr depreciated, using XBase->errstr instead. Minor
608 changes in the documentation.
609
610 0.03301 Thu Nov 20 17:32:53 MET 1997
611
612 Handling null numeric fields (John D Groenveld). Changed
613 "look for error" test in header.t to be OS portable. Fixed bug
614 in decode_version_info (dbtflag). Fixed bug with field length
615 in XBase::create, spotted by Risto Wichman.
616
617 0.032 Thu Nov 6 16:27:10 MET 1997
618
619 Fixed bugs: test on "\r" in read_header; check of record
620 number in delete and undelete (spotted by Frans van Loon).
621 Added methods field_lengths and field_decimals and changed
622 *_on_read in [NF] section (spotted by John D Groenveld).
623
624 0.031 Thu Oct 30 19:47:37 MET 1997
625
626 Fixed bug in docs about write_record. Changed format of
627 get_field_info to include field number. Fixed bug with decimals.
628
629 0.03 Mon Oct 27 23:23:17 MET 1997 (*****)
630
631 Minor bug fixes. XBase::create added. Tests extended. Module
632 released on CPAN.
633
634 0.029 Fri Oct 24 19:34:32 MET DST 1997
635
636 Bug fixes. Added methods for writing dbt files.
637
638 The writing methods are now set_record, set_record_hash and
639 update_record.
640
641 0.024 Mon Oct 20 22:17:44 MET DST 1997
642
643 The original release. Includes XBase that reads dbf and dbt
644 and writes dbf (but not dbt). Put on CPAN mainly for other
645 people to test and comment.
646
647 ---
648
649 Note: Versions tagged (*****) were major updates and code changes.
650
651 I have been using the Xbase(3) module by Pratap Pereira for quite
652 a time to read the dbf files, but it had no writing capabilities, it
653 was not use strict clean and the author did not support the module
654 behind the version 1.07. So I started to make my own patches and
655 thought it would be nice if other people could make use of them.
656 I thought about taking over the development of the original Xbase
657 package, but the interface seemed rather complicated to me.
658
659 So with the help of article XBase File Format Description by Erik
660 Bachmann on URL
661
662 http://www.clicketyclick.dk/databases/xbase/format/
663 formerly http://www.e-bachmann.dk/docs/xbase.htm
664
665 I have written a new module. It doesn't use any code from Xbase-1.07
666 and you are free to use and distribute it under the same terms as Perl
667 itself.
668