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

FreeBSD Manual Pages

  
 
  

home | help
HTTP::Headers::ActionPUser:ContributedTPerHeaders::ActionPack::PriorityList(3)

NAME
       HTTP::Headers::ActionPack::PriorityList - A Priority List

VERSION
       version 0.09

SYNOPSIS
	 use HTTP::Headers::ActionPack::PriorityList;

	 # simple constructor
	 my $plist = HTTP::Headers::ActionPack::PriorityList->new(
	     [ 1.0 => 'foo' ],
	     [ 0.5 => 'bar' ],
	     [ 0.2 => 'baz' ],
	 );

	 # from	headers
	 my $plist = HTTP::Headers::ActionPack::PriorityList->new_from_string(
	     'foo; q=1.0, bar; q=0.5, baz; q=0.2'
	 );

DESCRIPTION
       This is a simple	priority list implementation, this is used to handle
       the Accept-* headers as they typically will contain values along	with a
       "q" value to indicate quality.

METHODS
       "new"
       "new_from_string	( $header_string )"
	   This	accepts	a HTTP header string which get parsed and loaded
	   accordingly.

       "index"
       "items"
       "add ( $quality,	$choice	)"
	   Add in a new	$choice	with a given $quality.

       "get ( $quality )"
	   Given a certain $quality, it	returns	the various choices available.

       "priority_of ( $choice )"
	   Given a certain $choice this	returns	the associated quality of it.

       "iterable"
	   This	returns	a list of two item ARRAY refs with the quality as the
	   first item and the associated choice	as the second item. These are
	   sorted accordingly.

	   When	two items have the same	priority, they are returned in the
	   order that they were	found in the header.

       "canonicalize_choice"
	   By default, this does nothing. It exists so that subclasses can
	   override it.

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			  20HTTP::Headers::ActionPack::PriorityList(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::PriorityList&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help