home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 10 / AU_CD10.iso / Updates / Perl / Non-RPC / GDBM / Versions < prev   
Text File  |  1997-07-15  |  3KB  |  65 lines

  1. Versions of the gdbm module
  2. ---------------------------
  3. S.W.Ellacott@brighton.ac.uk
  4.  
  5. 0.03 (11 Jul 1997)
  6. a) Added new SWI Gdbm_OpenIn (&4CC49)
  7.     As Gdbm_Open but file is opened for reading only, enabling more than
  8.     one task to access the file simultaneously.
  9. b) SWIs now return 0 if no handle exists (eg if a file failed to open)
  10.  
  11. 0.02 (24 Jun 1997)
  12. a) Used low level file calls to avoid 13 ANSI file limit of Acorn C.
  13. b) Added finalisation code to close files if the module is killed.
  14.  
  15. 0.01
  16. Not released
  17.  
  18. 0.00 (29 Feb 1996)
  19. Original version as distributed with release 1.51 of Perl
  20.  
  21. ----------------------------------------------------------
  22.  
  23. Versions of RDBM_File
  24. ---------------------
  25. S.W.Ellacott@brighton.ac.uk
  26.  
  27. 3. Mon 14th July 1997 (requires gdbm version 0.03)
  28. a) Modified to be more compatible with UNIX dbm managers. NB this version is not
  29. entirely backwards compatible.
  30. The commands
  31.     use RDBM_File;
  32.     tie(%hash, RDBM_File, filename, flags, mode);
  33. are not interpreted as follows:
  34. The array '%hash' is tied to the file 'filename' using the package RDBM_File
  35. (as in Version 2). The 'mode' parameter, if present, is ignored. The flags
  36. parameter is now interpreted in a simililar way to DB_File. If 'flags' is 0,
  37. the file is opened for reading only. This means that more than one hash, even
  38. from different tasks, can access the file at the same time. If bit 2 is set,
  39. the file is opened for reading and writing, and if bit 4 is set, the file is
  40. created if it does not already exist. Thus 
  41.     flags = 0    Open for reading only
  42.     flags = 8    Open for read/write
  43.     flags = 10    Open for read/write, creating if necessary.
  44. Note that this means that 'tie(%hash, RDBM_File, filename)' or 
  45. tie(%hash, RDBM_File, filename,0) will open the file for reading only, whereas
  46. previously it would have opened for reading and writing.
  47. b) To support the above change, package RDBM_File now exports the symbols
  48. O_RDONLY, O_RDWR, O_CREAT, returning values of 0,2 and 8 respectively. So
  49. to open a file for reading and writing, creating if necessary, put
  50.     tie(%hash, RDBM_File, filename, O_RDWR|O_CREAT); .
  51. c) If a file fails to open, RDBM_File now returns 0 rather than dying. So you
  52. need to test the value returned by tie or dbmopen to see if the file opened
  53. successfully. (However version 0.03 of gdbm is less likely to crash than
  54. previous versions if you do not do this: you will simply not get any values
  55. returned.)
  56. d) If you try and access a value not previously defined, it is now set to
  57. 0 rather than undef. So if you write '$hash{key}++' where '$hash{key}' has
  58. no previous value, $hash{key} is set to 1, instead of causing an error. (In my
  59. opinion this is not logical, but some UNIX scripts seem to require it:-{)
  60.  
  61.  
  62. 2. Distributed with latex2html
  63. Now able to store numbers as well as strings.
  64.  
  65. 1. Distributed with Perl release 1.51