]> granicus.if.org Git - curl/commitdiff
no longer use the MIME::Base64.pm package as it seems to not be standard
authorDaniel Stenberg <daniel@haxx.se>
Tue, 30 Nov 2004 09:27:11 +0000 (09:27 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 30 Nov 2004 09:27:11 +0000 (09:27 +0000)
on lots of perl versions, provide our own base64 decoder

tests/getpart.pm
tests/runtests.pl

index 1dffe353c853ee29624879e81f8344e878c95c95..48be6c2da74b64e7f619e145d5494e97fcec2b2f 100644 (file)
@@ -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
index ba13d24138a72af7907c91c8d28a36bfca77ace2..5f69e918ec96232995b2aa15dd551d48bd5e9ed5 100755 (executable)
@@ -23,7 +23,6 @@
 ###########################################################################
 # These should be the only variables that might be needed to get edited:
 
-use MIME::Base64;
 use strict;
 #use warnings;