c26e8ac4f73a449ed52f38aa55a340a8deccaaf5
[scpubgit/App-EzPz.git] / bin / ezpz-admin-repl
1 #!/usr/bin/env perl
2
3 use lib (-d 'lib' ? ('lib') : ());
4 use File::Which;
5 use App::EzPz::UserStore;
6 use strictures 1;
7
8 die "Usage: ezpz-admin-repl htpasswd-file [ezmlm-bindir list-base-dir]"
9   unless @ARGV == 1 or @ARGV == 3;
10
11 {
12   package Eval::WithLexicals::Scratchpad;
13
14   use vars qw($users);
15
16   $users = App::EzPz::UserStore->new(
17     htpasswd_file => $ARGV[0],
18     (@ARGV > 1)
19       ? (ezmlm_config => {
20            bindir => $ARGV[1],
21            list_base_dir => $ARGV[2],
22         })
23       : ()
24   );
25 }
26
27 do +which('tinyrepl');
28
29 exit 0;