summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-08-28 22:31:57 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-08-28 22:33:14 +0200
commitae9508e52c69ad5ee1d32539e184f4644483b3c8 (patch)
tree5cc1d2f7d186ec8cc59b1c1483b1043ee096c6e1
parent003e81e2a3d2e72c2319ef9bd285141fe02e0b26 (diff)
downloadcurl-bagder/getpart-base64.tar.gz
tests/getpart: use MIME::Base64 instead of home-cookedbagder/getpart-base64
Since we already use the base64 package since a while back, we can just as well switch to that here too. It also happens to use the exact same function name, which otherwise causes a run-time warning. Reported-by: Marc Hörsken Fixes #5885
-rw-r--r--tests/getpart.pm7
1 files changed, 1 insertions, 6 deletions
diff --git a/tests/getpart.pm b/tests/getpart.pm
index 9519888ee..2162129dc 100644
--- a/tests/getpart.pm
+++ b/tests/getpart.pm
@@ -28,12 +28,7 @@ my $xmlfile;
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
-}
+use MIME::Base64;
sub decode_hex {
my $s = $_;