1HTTP::Headers::ActionPaUcske:r:MCeodnitarTiybpuetHLeTidTsPtP:(e:3rH)leaDdoecrusm:e:nAtcattiioonnPack::MediaTypeList(3)
2
3
4

NAME

6       HTTP::Headers::ActionPack::MediaTypeList - A Priority List customized
7       for Media Types
8

VERSION

10       version 0.09
11

SYNOPSIS

13         use HTTP::Headers::ActionPack::MediaTypeList;
14
15         # normal constructor
16         my $list = HTTP::Headers::ActionPack::MediaTypeList->new(
17             HTTP::Headers::ActionPack::MediaType->new('audio/*', q => 0.2 ),
18             HTTP::Headers::ActionPack::MediaType->new('audio/basic', q => 1.0 )
19         );
20
21         # you can also specify the 'q'
22         # rating independent of the
23         # media type definition
24         my $list = HTTP::Headers::ActionPack::MediaTypeList->new(
25             [ 0.2 => HTTP::Headers::ActionPack::MediaType->new('audio/*', q => 0.2 )     ],
26             [ 1.0 => HTTP::Headers::ActionPack::MediaType->new('audio/basic' ) ]
27         );
28
29         # or from a string
30         my $list = HTTP::Headers::ActionPack::MediaTypeList->new_from_string(
31             'audio/*; q=0.2, audio/basic'
32         );
33

DESCRIPTION

35       This is a subclass of the HTTP::Headers::ActionPack::PriorityList class
36       with some specific media-type features. It is the default object used
37       to parse most of the "Accept" header since they will often contain more
38       then one media type.
39

METHODS

41       "iterable"
42           This returns the same data type as the parent (two element ARRAY
43           ref with quality and choice), but the choice element will be a
44           HTTP::Headers::ActionPack::MediaType object. This is also sorted in
45           a very specific manner in order to align with RFC-2616 Sec14.
46
47             Media ranges can be overridden by more specific
48             media ranges or specific media types. If more
49             than one media range applies to a given type,
50             the most specific reference has precedence.
51
52       "canonicalize_choice"
53           If this is passed a string, it returns a new
54           HTTP::Headers::ActionPack::MediaType object from that string. If it
55           receives an object it simply returns that object as is.
56

AUTHOR

58       Stevan Little <stevan.little@iinteractive.com>
59

CONTRIBUTORS

61       •   Andrew Nelson <anelson@cpan.org>
62
63       •   Dave Rolsky <autarch@urth.org>
64
65       •   Florian Ragwitz <rafl@debian.org>
66
67       •   Jesse Luehrs <doy@tozt.net>
68
69       •   Karen Etheridge <ether@cpan.org>
70
72       This software is copyright (c) 2012 by Infinity Interactive, Inc..
73
74       This is free software; you can redistribute it and/or modify it under
75       the same terms as the Perl 5 programming language system itself.
76
77
78
79perl v5.38.0                      20H2T3T-P0:7:-H2e0aders::ActionPack::MediaTypeList(3)
Impressum