#!/usr/bin/env perl
# Copyright (c) 2016-2020 Christian Jaeger, copying@christianjaeger.ch
# This is free software. See the file COPYING.md that came bundled
# with this file.
use
strict;
use
warnings;
#use experimental "signatures";
#use Sub::Call::Tail;
# find modules from functional-perl working directory (not installed)
our
(
$mydir
,
$myname
);
BEGIN {
my
$location
= (-l $0) ? abs_path($0) : $0;
$location
=~ /(.*?)([^\/]+?)_?\z/s or
die
"?"
;
(
$mydir
,
$myname
) = ($1, $2);
}
sub
usage {
"usage:
$myname
...
";
exit
1;
}
use
Getopt::Long;
our
$verbose
= 0;
GetOptions(
"verbose"
=> \
$verbose
,
"help"
=>
sub
{usage},) or
exit
1;
usage
if
@ARGV
;
# example module use:
use
Chj::TEST;
# for development/debugging
use
Chj::ruse;
use
FP::Repl;
# add your own code.... (possibly adding `repl` calls within, too;
# also, it's better to put most code in modules, and use `ruse` to
# reload them (main is [currently?] not reloaded by `ruse`))
# during development:
repl;