Backup::Hanoi - select backup according to algo
version 0.001
This is an early release. This code is currently not used in production by the author. Use it with care!
my @devices = ('A', 'B', 'C', 'D'); my $backup = Backup::Hanoi->new(\@devices); # calculate the next 100 backup cycles for (0 .. 99) { print $backup->get_device_for_cycle($_); print "\n"; }
See also the script backup-hanoi.
Takes a reference to a list with at least three items.
Give a positive integer greather than zero, receive a string which reprecents the selcted item.
Boris Däppen <bdaeppen.perl@gmail.com>
This software is copyright (c) 2018 by Boris Däppen.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Backup::Hanoi, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Backup::Hanoi
CPAN shell
perl -MCPAN -e shell install Backup::Hanoi
For more information on module installation, please visit the detailed CPAN module installation guide.