++ed by:
SMITHFARM ROBINS DROLSKY JAITKEN OALDERS

20 PAUSE users
4 non-PAUSE users.

Dave Rolsky
and 13 contributors

NAME

Web::Machine::Util::ContentNegotiation - Module to handle content negotiation

VERSION

version 0.15

SYNOPSIS

  use Web::Machine::FSM::ContentNegotiation;

DESCRIPTION

This module provides a set of functions used in content negotiation.

FUNCTIONS

choose_media_type ( $provided, $header )

Given an ARRAY ref of media type strings and an HTTP header, this will return the matching HTTP::Headers::ActionPack::MediaType instance.

match_acceptable_media_type ( $to_match, $accepted )

Given a media type string to match and an ARRAY ref of media type objects, this will return the first matching one.

choose_language ( $provided, $header )

Given a list of language codes and an HTTP header value, this will attempt to negotiate the best language match.

choose_charset ( $provided, $header )

Given a list of charset name and an HTTP header value, this will attempt to negotiate the best charset match.

choose_encoding ( $provided, $header )

Given a list of encoding name and an HTTP header value, this will attempt to negotiate the best encoding match.

AUTHOR

Stevan Little <stevan.little@iinteractive.com>

CONTRIBUTORS

  • Andreas Marienborg <andreas.marienborg@gmail.com>

  • Andrew Nelson <anelson@cpan.org>

  • Arthur Axel 'fREW' Schmidt <frioux@gmail.com>

  • Carlos Fernando Avila Gratz <cafe@q1software.com>

  • Dave Rolsky <autarch@urth.org>

  • Fayland Lam <fayland@gmail.com>

  • George Hartzell <hartzell@alerce.com>

  • Gregory Oschwald <goschwald@maxmind.com>

  • Jesse Luehrs <doy@tozt.net>

  • John SJ Anderson <genehack@genehack.org>

  • Mike Raynham <enquiries@mikeraynham.co.uk>

  • Mike Raynham <mike.raynham@spareroom.co.uk>

  • Olaf Alders <olaf@wundersolutions.com>

  • Thomas Sibley <tsibley@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Infinity Interactive, Inc..

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.