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

FreeBSD Manual Pages

  
 
  

home | help
List::Util::WeightedRoUseroContributed Perl DList::Util::WeightedRoundRobin(3)

NAME
       List::Util::WeightedRoundRobin -	Creates	a list based on	weighted input

SYNOPSIS
	 my $list = [
	   {
	       name    => 'jingle',
	       weight  => 6,
	   },
	   {
	       name    => 'bells',
	       weight  => 2,
	   },
	 ];

	 my $WeightedList = List::Util::WeightedRoundRobin->new();
	 my $weighted_list = $WeightedList->create_weighted_list( $list	);

DESCRIPTION
       "List::Util::WeightedRoundRobin"	is a utility for creating a weighted
       list based on the input and associated weights.

METHOD
   new
       Constructs a new	"List::Util::WeightedRoundRobin" and returns it. Takes
       no arguments.

   create_weighted_list
       Takes an	array reference	as an argument.	The array reference must
       contain hash entries which have a 'name'	and 'weight' key.

       If the sources are valid	and a weighted list has	been created, the
       method will return a weighted list. In the case of an error, the
       returned	list will be empty.

AUTHOR
       Alistair	Francis, http://search.cpan.org/~friffin/

COPYRIGHT AND LICENSE
       This library is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself, either Perl	version	5.10 or, at
       your option, any	later version of Perl 5	you may	have available.

POD ERRORS
       Hey! The	above document had some	coding errors, which are explained
       below:

       Around line 126:
	   You forgot a	'=back'	before '=head2'

perl v5.24.1			  2009-11-18 List::Util::WeightedRoundRobin(3)

NAME | SYNOPSIS | DESCRIPTION | METHOD | AUTHOR | COPYRIGHT AND LICENSE | POD ERRORS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=List::Util::WeightedRoundRobin&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help