Re: re-usage of LWP::MediaTypes
Gisle Aas (gisle@aas.no)
09 Jul 1998 07:32:56 +0200
Doug MacEachern <dougm@pobox.com> writes:
> The patch below just makes LWP::MediaTypes a bit more re-usable, if
> you wanted to, say, replace Apache's mod_mime.c with an Apache::MIME
> module.
Very nice! It will be there in the next release.
> + Example:
> +
> + add_encoding("x-gzip" => "gz");
> +
> +=cut
> +
> +sub add_encoding
> +{
> + my $type = shift;
> + for my $ext (@_) {
> + $ext =~ s/^\.//;
> + $suffixEncoding{$ext} = $type;
> + }
> +}
I get "Modification of a read-only value attempted" with the example
you gave. I wished people would also update the test suite when
sending patches :-)
Regards,
Gisle