GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
List::Util::WeightedRoundRobin(3) User Contributed Perl Documentation List::Util::WeightedRoundRobin(3)

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

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

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

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

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

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.

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

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.

Hey! The above document had some coding errors, which are explained below:
Around line 126:
You forgot a '=back' before '=head2'
2009-11-18 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.