… | |
… | |
134 | |
134 | |
135 | require XSLoader; |
135 | require XSLoader; |
136 | XSLoader::load ("BDB", $VERSION); |
136 | XSLoader::load ("BDB", $VERSION); |
137 | } |
137 | } |
138 | |
138 | |
|
|
139 | =head2 FILENAMES/DATABASE NAMES |
|
|
140 | |
|
|
141 | The BDB expects "binary" filenames (octet strings) for pathnames on POSIX |
|
|
142 | systems, and "unicode" filenames (strings with characters potentially |
|
|
143 | >255) on Win32 (expecting a Unicode win32 build - win32 is a total mess). |
|
|
144 | |
139 | =head2 BERKELEYDB FUNCTIONS |
145 | =head2 BERKELEYDB FUNCTIONS |
140 | |
146 | |
141 | All of these are functions. The create functions simply return a new |
147 | All of these are functions. The create functions simply return a new |
142 | object and never block. All the remaining functions all take an optional |
148 | object and never block. All the remaining functions take an optional |
143 | callback as last argument. If it is missing, then the function will be |
149 | callback as last argument. If it is missing, then the function will be |
144 | executed synchronously. In both cases, C<$!> will reflect the return value |
150 | executed synchronously. In both cases, C<$!> will reflect the return value |
145 | of the function. |
151 | of the function. |
146 | |
152 | |
147 | BDB functions that cannot block (mostly functions that manipulate |
153 | BDB functions that cannot block (mostly functions that manipulate |
148 | settings) are method calls on the relevant objects, so the rule of thumb |
154 | settings) are method calls on the relevant objects, so the rule of thumb |
149 | is: if its a method, its not blocking, if its a function, it takes a |
155 | is: if it's a method, it's not blocking, if it's a function, it takes a |
150 | callback as last argument. |
156 | callback as last argument. |
151 | |
157 | |
152 | In the following, C<$int> signifies an integer return value, |
158 | In the following, C<$int> signifies an integer return value, |
153 | C<octetstring> is a "binary string" (i.e. a perl string with no character |
159 | C<octetstring> is a "binary string" (i.e. a perl string with no character |
154 | indices >255), C<U32> is an unsigned 32 bit integer, C<int> is some |
160 | indices >255), C<U32> is an unsigned 32 bit integer, C<int> is some |