--- Convert-UUlib/UUlib.pm 2002/10/15 23:35:31 1.15 +++ Convert-UUlib/UUlib.pm 2007/03/25 00:18:07 1.28 @@ -1,15 +1,18 @@ package Convert::UUlib; +no warnings; +use strict; + use Carp; require Exporter; require DynaLoader; -$VERSION = 0.31; +our $VERSION = '1.08'; -@ISA = qw(Exporter DynaLoader); +our @ISA = qw(Exporter DynaLoader); -@_consts = qw( +our @_consts = qw( ACT_COPYING ACT_DECODING ACT_ENCODING ACT_IDLE ACT_SCANNING FILE_DECODED FILE_ERROR FILE_MISPART FILE_NOBEGIN FILE_NODATA @@ -17,6 +20,7 @@ MSG_ERROR MSG_FATAL MSG_MESSAGE MSG_NOTE MSG_PANIC MSG_WARNING + OPT_RBUF OPT_WBUF OPT_BRACKPOL OPT_DEBUG OPT_DESPERATE OPT_DUMBNESS OPT_ENCEXT OPT_ERRNO OPT_FAST OPT_IGNMODE OPT_IGNREPLY OPT_OVERWRITE OPT_PREAMB OPT_PROGRESS OPT_SAVEPATH OPT_TINYB64 OPT_USETEXT OPT_VERBOSE @@ -29,7 +33,7 @@ XX_ENCODED UU_ENCODED YENC_ENCODED ); -@_funcs = qw( +our @_funcs = qw( Initialize CleanUp GetOption SetOption strerror SetMsgCallback SetBusyCallback SetFileCallback SetFNameFilter SetFileNameCallback FNameFilter LoadFile GetFileListItem RenameFile DecodeToTemp @@ -40,9 +44,9 @@ straction strencoding strmsglevel ); -@EXPORT = @_consts; -@EXPORT_OK = @_funcs; -%EXPORT_TAGS = (all => [@_consts,@_funcs], constants => \@_consts); +our @EXPORT = @_consts; +our @EXPORT_OK = @_funcs; +our %EXPORT_TAGS = (all => [@_consts,@_funcs], constants => \@_consts); bootstrap Convert::UUlib $VERSION; @@ -53,6 +57,7 @@ for (@_consts) { my $constant = constant($_); + no strict 'refs'; *$_ = sub () { $constant }; } @@ -156,6 +161,8 @@ OPT_REMOVE remove input files after decoding (dangerous) OPT_MOREMIME strict MIME adherence OPT_DOTDOT ".."-unescaping has not yet been done on input files + OPT_RBUF set default read I/O buffer size in bytes *EXPERIMENTAL* + OPT_WBUF set default write I/O buffer size in bytes *EXPERIMENTAL* =head2 Result/Error codes @@ -259,11 +266,15 @@ =over 4 -=item ($retval, $count) = LoadFile $fname, [$id, [$delflag]] +=item ($retval, $count) = LoadFile $fname, [$id, [$delflag, [$partno]]] Load the given file and scan it for encoded contents. Optionally tag it -with the given id, and if C<$delflag> is true, delete the file after it is -no longer necessary. +with the given id, and if C<$delflag> is true, delete the file after it +is no longer necessary. If you are certain of the part number, you can +specify it as the last argument. + +A better (usually faster) way of doing this is using the C +functionality. =item $retval = Smerge $pass @@ -532,7 +543,7 @@ =head1 AUTHOR -Marc Lehmann , the original uulib library was written +Marc Lehmann , the original uulib library was written by Frank Pilhofer , and later heavily bugfixed by Marc Lehmann.