#!/usr/bin/env perl

use strict;
use warnings;
use Math::BigInt try => 'GMP';
use Math::DifferenceSet::Planar;

$| = 1;

die "usage: pds_spaces [database]\n" if 1 < @ARGV;
Math::DifferenceSet::Planar->set_database(@ARGV) if 1 == @ARGV;

my $it = Math::DifferenceSet::Planar->iterate_known_spaces;
while (my $txt = $it->()) {
    print "$txt\n";
}

__END__
=head1 NAME

pds_spaces - display stored rotator space data

=head1 SYNOPSIS

  pds_spaces [database]

=head1 DESCRIPTION

This example program iterates through stored planar difference set space
structures and displays them as text.  This tool is intended mostly as a
debugging-aid, as the precise meaning of the information and its usage
within the library is implementation-dependent and mostly affecting
performance rather than functionality.

=head1 AUTHOR

Martin Becker, E<lt>becker-cpan-mp I<at> cozap.comE<gt>

=head1 COPYRIGHT AND LICENSE

Copyright (c) 2019-2022 by Martin Becker, Blaubeuren.

This library is free software; you can distribute it and/or modify it
under the terms of the Artistic License 2.0 (see the LICENSE file).

=head1 DISCLAIMER OF WARRANTY

This library is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose.

=cut
