… | |
… | |
3 | use Carp; |
3 | use Carp; |
4 | |
4 | |
5 | require Exporter; |
5 | require Exporter; |
6 | require DynaLoader; |
6 | require DynaLoader; |
7 | |
7 | |
8 | $VERSION = 0.31; |
8 | $VERSION = "1.02"; |
9 | |
9 | |
10 | @ISA = qw(Exporter DynaLoader); |
10 | @ISA = qw(Exporter DynaLoader); |
11 | |
11 | |
12 | @_consts = qw( |
12 | @_consts = qw( |
13 | ACT_COPYING ACT_DECODING ACT_ENCODING ACT_IDLE ACT_SCANNING |
13 | ACT_COPYING ACT_DECODING ACT_ENCODING ACT_IDLE ACT_SCANNING |
… | |
… | |
151 | OPT_PROGRESS retrieve progress information |
151 | OPT_PROGRESS retrieve progress information |
152 | OPT_USETEXT handle text messages |
152 | OPT_USETEXT handle text messages |
153 | OPT_PREAMB handle Mime preambles/epilogues |
153 | OPT_PREAMB handle Mime preambles/epilogues |
154 | OPT_TINYB64 detect short B64 outside of Mime |
154 | OPT_TINYB64 detect short B64 outside of Mime |
155 | OPT_ENCEXT extension for single-part encoded files |
155 | OPT_ENCEXT extension for single-part encoded files |
156 | OPT_REMOVE remove input files after decoding |
156 | OPT_REMOVE remove input files after decoding (dangerous) |
157 | OPT_MOREMIME strict MIME adherence |
157 | OPT_MOREMIME strict MIME adherence |
158 | OPT_DOTDOT .. unescaping has not yet been done on input files |
158 | OPT_DOTDOT ".."-unescaping has not yet been done on input files |
159 | |
159 | |
160 | =head2 Result/Error codes |
160 | =head2 Result/Error codes |
161 | |
161 | |
162 | RET_OK everything went fine |
162 | RET_OK everything went fine |
163 | RET_IOERR I/O Error - examine errno |
163 | RET_IOERR I/O Error - examine errno |
… | |
… | |
203 | |
203 | |
204 | Initialize is automatically called when the module is loaded and allocates |
204 | Initialize is automatically called when the module is loaded and allocates |
205 | quite a small amount of memory for todays machines ;) CleanUp releases that |
205 | quite a small amount of memory for todays machines ;) CleanUp releases that |
206 | again. |
206 | again. |
207 | |
207 | |
|
|
208 | On my machine, a fairly complete decode with DBI backend needs about 10MB |
|
|
209 | RSS to decode 20000 files. |
|
|
210 | |
208 | =over 4 |
211 | =over 4 |
209 | |
212 | |
210 | =item Initialize |
213 | =item Initialize |
211 | |
214 | |
212 | Not normally necessary, (re-)initializes the library. |
215 | Not normally necessary, (re-)initializes the library. |
… | |
… | |
254 | |
257 | |
255 | =head2 Loading sourcefiles, optionally fuzzy merge and start decoding |
258 | =head2 Loading sourcefiles, optionally fuzzy merge and start decoding |
256 | |
259 | |
257 | =over 4 |
260 | =over 4 |
258 | |
261 | |
259 | =item ($retval, $count) = LoadFile $fname, [$id, [$delflag]] |
262 | =item ($retval, $count) = LoadFile $fname, [$id, [$delflag, [$partno]]] |
260 | |
263 | |
261 | Load the given file and scan it for encoded contents. Optionally tag it |
264 | Load the given file and scan it for encoded contents. Optionally tag it |
262 | with the given id, and if C<$delflag> is true, delete the file after it is |
265 | with the given id, and if C<$delflag> is true, delete the file after it |
263 | no longer necessary. |
266 | is no longer necessary. If you are certain of the part number, you can |
|
|
267 | specify it as the last argument. |
|
|
268 | |
|
|
269 | A better (usually faster) way of doing this is using the C<SetFNameFilter> |
|
|
270 | functionality. |
264 | |
271 | |
265 | =item $retval = Smerge $pass |
272 | =item $retval = Smerge $pass |
266 | |
273 | |
267 | If you are desperate, try to call C<Smerge> with increasing C<$pass> |
274 | If you are desperate, try to call C<Smerge> with increasing C<$pass> |
268 | values, beginning at C<0>, to try to merge parts that usually would not |
275 | values, beginning at C<0>, to try to merge parts that usually would not |