-# Copyright (C) 2020 all contributors <meta@public-inbox.org>
+# Copyright (C) 2020-2021 all contributors <meta@public-inbox.org>
# Copyright (C) 2004- Simon Cozens, Casey West, Ricardo SIGNES
# This library is free software; you can redistribute it and/or modify
# it under the same terms as Perl itself.
type => $type,
subtype => $subtype,
attributes => $attributes,
-
- # This is dumb. Really really dumb. For backcompat. -- rjbs,
- # 2013-08-10
- discrete => $type,
- composite => $subtype,
};
}
foreach (keys %{$attribs}) {
next unless $_ =~ m/^(.*)\*$/;
my $key = $1;
- next unless $attribs->{$_} =~ m/^$re_exvalue$/;
+ next unless ($attribs->{$_} // '') =~ m/^$re_exvalue$/;
my ($charset, $value) = ($1, $2);
$value =~ s/%([0-9A-Fa-f]{2})/pack('C', hex($1))/eg;
if (length $charset) {
a hash as above, with entries for the C<type>, the C<subtype>, and a hash of
C<attributes>.
-For backward compatibility with a really unfortunate misunderstanding of RFC
-2045 by the early implementors of this module, C<discrete> and C<composite> are
-also present in the returned hashref, with the values of C<type> and C<subtype>
-respectively.
-
=func parse_content_disposition
This routine is exported by default.