The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Backup::Hanoi - select backup according to algo

VERSION

version 0.001

SYNOPSIS

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.

FUNCTIONS

get_device_for_cycle

Takes a reference to a list with at least three items.

get_device_for_cycle

Give a positive integer greather than zero, receive a string which reprecents the selcted item.

AUTHOR

Boris Däppen <bdaeppen.perl@gmail.com>

COPYRIGHT AND LICENSE

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.