sub decodable { # should match the Content-Encoding values that decoded_content can deal with my $self = shift; my @enc; # XXX preferably we should determine if the modules are available without loading # them here eval { require IO::Uncompress::Gunzip; push(@enc, "gzip", "x-gzip"); }; eval { require IO::Uncompress::Inflate; require IO::Uncompress::RawInflate; push(@enc, "deflate"); }; eval { require IO::Uncompress::Bunzip2; push(@enc, "x-bzip2"); }; # we don't care about announcing the 'identity', 'base64' and # 'quoted-printable' stuff return wantarray ? @enc : join(", ", @enc); }