aboutsummaryrefslogtreecommitdiff
path: root/website.pl
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2018-12-29 16:20:05 -0200
committerEuAndreh <eu@euandre.org>2018-12-29 16:20:05 -0200
commita203ce1f68ebd36552d34290e03a319d6860bcde (patch)
tree2527f60fa8f92933681bc03f700f494895705289 /website.pl
parentAdd =test= to default.nix and run in on CI. (diff)
downloadeuandre.org-a203ce1f68ebd36552d34290e03a319d6860bcde.tar.gz
euandre.org-a203ce1f68ebd36552d34290e03a319d6860bcde.tar.xz
Use Getopt::Long and Pod::Usage to build basic CLI.
Diffstat (limited to 'website.pl')
-rwxr-xr-xwebsite.pl63
1 files changed, 0 insertions, 63 deletions
diff --git a/website.pl b/website.pl
deleted file mode 100755
index cb81ff3..0000000
--- a/website.pl
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/env nix-shell
-#!nix-shell -i perl -p perl less --pure
-
-=head1 NAME
-
-cli.pl - Using GetOpt::Long and Pod::Usage
-
-=head1 SYNOPSIS
-
-sample [options] [file ...]
-
- Options:
- --help brief help message
- --man full documentation
-
-=head1 OPTIONS
-
-=over 4
-
-=item B<-h, --help>
-
-Print a brief help message and exits.
-
-=item B<--man>
-
-Prints the manual page and exits.
-
-=back
-
-=head1 DESCRIPTION
-
-B<This program> will read the given input file(s) and do something
-useful with the contents thereof.
-
-=cut
-
-use strict;
-use warnings;
-use Getopt::Long qw(:config no_ignore_case bundling auto_help auto_version);
-use Pod::Usage qw(pod2usage);
-
-my $help = 0;
-my $title = '';
-GetOptions(
- "t|title=s" => \$title,
- 'help|h|?' => \$help
-) or pod2usage(-verbose => 1);
-pod2usage(
- -verbose => 2,
- -exitval => 0
-) if $help || (defined $ARGV[0] and $ARGV[0] eq "help");
-
-## If no arguments were given, then allow STDIN to be used only
-## if it's not connected to a terminal (otherwise print usage)
-pod2usage("$0: No files given.") if ((@ARGV == 0) && (-t STDIN));
-
-print `fd sh`;
-print `find . -type f -name '*sh*'`;
-
-
-# FIXME: add tests (inline + bats)
-
-