Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
HTTP::Headers::ActionPUser:Contributed)HTTP::Headers::ActionPack::MediaType(3)

NAME
       HTTP::Headers::ActionPack::MediaType - A	Media Type

VERSION
       version 0.09

SYNOPSIS
	 use HTTP::Headers::ActionPack::MediaType;

	 # normal constructor
	 my $mt	= HTTP::Headers::ActionPack::MediaType->new(
	     'application/xml' => (
		 'q'	   => 0.5,
		 'charset' => 'UTF-8'
	     )
	 );

	 # construct from string
	 my $mt	= HTTP::Headers::ActionPack::MediaType->new_from_string(
	     'application/xml; q=0.5; charset=UTF-8'
	 );

DESCRIPTION
       This is an object which represents an HTTP media	type definition. This
       is most often found as a	member of a
       HTTP::Headers::ActionPack::MediaTypeList	object.

METHODS
       "type"
	   Accessor for	the type.

       "major"
	   The major portion of	the media type name.

       "minor"
	   The minor portion of	the media type name.

       "matches_all"
	   A media type	matched	all if the type	is "*/*" and if	it has no
	   parameters.

       "equals ( $media_type | $media_type_string )"
	   This	will attempt to	determine if the $media_type is	exactly	the
	   same	as itself. If given a $media_type_string it will parse it into
	   an object.

	   In order for	two type to be equal, the types	must match exactly and
	   the parameters much match exactly.

       "exact_match ( $media_type | $media_type_string )"
	   This	will attempt to	determine if the $media_type is	a match	with
	   itself using	the "type_matches" method below.  If given a
	   $media_type_string it will parse it into an object.

	   In order for	an exact match to occur	it the types must be
	   compatible and the parameters much match exactly.

       "match (	$media_type | $media_type_string )"
	   This	will attempt to	determine if the $media_type is	a match	with
	   itself using	the "type_matches" method and "params_match" method
	   below. If given a $media_type_string	it will	parse it into an
	   object.

	   In order for	an exact match to occur	it the types must be
	   compatible and the parameters must be a subset.

       "type_matches ( $media_type | $media_type_string	)"
	   This	will determine type compatibility, properly handling the "*"
	   types and major and minor elements of the type.

       "params_match ( $parameters )"
	   This	determines if the $parameters are a subset of the invocants
	   parameters.

AUTHOR
       Stevan Little <stevan.little@iinteractive.com>

CONTRIBUTORS
       o   Andrew Nelson <anelson@cpan.org>

       o   Dave	Rolsky <autarch@urth.org>

       o   Florian Ragwitz <rafl@debian.org>

       o   Jesse Luehrs	<doy@tozt.net>

       o   Karen Etheridge <ether@cpan.org>

COPYRIGHT AND LICENSE
       This software is	copyright (c) 2012 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.

perl v5.32.0			  2013-HTTP::Headers::ActionPack::MediaType(3)

NAME | VERSION | SYNOPSIS | DESCRIPTION | METHODS | AUTHOR | CONTRIBUTORS | COPYRIGHT AND LICENSE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=HTTP::Headers::ActionPack::MediaType&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help