#!/bin/env perl

use strict;
use warnings;
use LATMOS::Accounts::Acls;
use Getopt::Long;
use Pod::Usage;

=head1 NAME

    la-acls - Test acls file

=head1 SYNOPSIS

    la-acls [-d] acl_file

=cut

GetOptions(
    'd|dump' => \my $dump,
    'help'       => sub { pod2usage(0) },
) or pod2usage();

=head1 OPTIONS

=over 4

=item -d: dump the acl list content

=back

=cut

if (!$ARGV[0]) {warn "You must specify 'acl_file', aborting\n"; pod2usage(); }

if(my $acls = LATMOS::Accounts::Acls->new($ARGV[0])) {
    $acls->dump if ($dump);
    exit 0;
} else {
    warn "Error during acls parsing\n";
    exit 1;
}


