diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-11-30 09:27:11 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-11-30 09:27:11 +0000 |
commit | fe0585ec919117b5e8cad63d89c4c09685df0042 (patch) | |
tree | 92498073ecf9f71dd87dad11543dbce8db6a2e98 /tests/getpart.pm | |
parent | 18c0b49f3d7e6dcf52b149f08c6adfd33af12a70 (diff) | |
download | curl-fe0585ec919117b5e8cad63d89c4c09685df0042.tar.gz |
no longer use the MIME::Base64.pm package as it seems to not be standard
on lots of perl versions, provide our own base64 decoder
Diffstat (limited to 'tests/getpart.pm')
-rw-r--r-- | tests/getpart.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/getpart.pm b/tests/getpart.pm index 1dffe353c..48be6c2da 100644 --- a/tests/getpart.pm +++ b/tests/getpart.pm @@ -6,6 +6,13 @@ my @xml; my $warning=0; my $trace=0; +sub decode_base64 { + tr:A-Za-z0-9+/::cd; # remove non-base64 chars + tr:A-Za-z0-9+/: -_:; # convert to uuencoded format + my $len = pack("c", 32 + 0.75*length); # compute length byte + return unpack("u", $len . $_); # uudecode and print +} + sub getpartattr { # if $part is undefined (ie only one argument) then # return the attributes of the section |