1 | package Convert::UUlib; |
1 | package Convert::UUlib; |
2 | |
2 | |
3 | no warnings; |
3 | use common::sense; |
4 | use strict; |
|
|
5 | |
4 | |
6 | use Carp; |
5 | use Carp; |
7 | |
6 | |
8 | require Exporter; |
7 | require Exporter; |
9 | require DynaLoader; |
8 | require DynaLoader; |
10 | |
9 | |
11 | our $VERSION = 1.62; |
10 | our $VERSION = 1.7; |
12 | |
11 | |
13 | our @ISA = qw(Exporter DynaLoader); |
12 | our @ISA = qw(Exporter DynaLoader); |
14 | |
13 | |
15 | our @_consts = qw( |
14 | our @_consts = qw( |
16 | ACT_COPYING ACT_DECODING ACT_ENCODING ACT_IDLE ACT_SCANNING |
15 | ACT_COPYING ACT_DECODING ACT_ENCODING ACT_IDLE ACT_SCANNING |
… | |
… | |
50 | |
49 | |
51 | bootstrap Convert::UUlib $VERSION; |
50 | bootstrap Convert::UUlib $VERSION; |
52 | |
51 | |
53 | # dummy function for compatiiblity with pre-1.7 versions |
52 | # dummy function for compatiiblity with pre-1.7 versions |
54 | sub Initialize { } |
53 | sub Initialize { } |
55 | |
|
|
56 | for (@_consts) { |
|
|
57 | my $constant = constant ($_); |
|
|
58 | no strict 'refs'; |
|
|
59 | *$_ = sub () { $constant }; |
|
|
60 | } |
|
|
61 | |
54 | |
62 | # action code -> string mapping |
55 | # action code -> string mapping |
63 | sub straction($) { |
56 | sub straction($) { |
64 | return 'copying' if $_[0] == &ACT_COPYING; |
57 | return 'copying' if $_[0] == &ACT_COPYING; |
65 | return 'decoding' if $_[0] == &ACT_DECODING; |
58 | return 'decoding' if $_[0] == &ACT_DECODING; |
… | |
… | |
603 | security purposes requires care. |
596 | security purposes requires care. |
604 | |
597 | |
605 | Likewise, file sizes when the uulib library was written were tiny compared |
598 | Likewise, file sizes when the uulib library was written were tiny compared |
606 | to today, so do not expect this library to handle files larger than 2GB. |
599 | to today, so do not expect this library to handle files larger than 2GB. |
607 | |
600 | |
|
|
601 | Lastly, this module uses a very "C-like" interface, which means it doesn't |
|
|
602 | protect you from invalid points as you might expect from "more perlish" |
|
|
603 | modules - for example, accessing a file item object after callinbg |
|
|
604 | C<CleanUp> will likely result in crashes, memory corruption, or worse. |
|
|
605 | |
608 | =head1 AUTHOR |
606 | =head1 AUTHOR |
609 | |
607 | |
610 | Marc Lehmann <schmorp@schmorp.de>, the original uulib library was written |
608 | Marc Lehmann <schmorp@schmorp.de>, the original uulib library was written |
611 | by Frank Pilhofer <fp@informatik.uni-frankfurt.de>, and later heavily |
609 | by Frank Pilhofer <fp@informatik.uni-frankfurt.de>, and later heavily |
612 | bugfixed by Marc Lehmann. |
610 | bugfixed by Marc Lehmann. |