aboutsummaryrefslogtreecommitdiff
path: root/slides/website-slides
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2018-12-29 18:11:49 -0200
committerEuAndreh <eu@euandre.org>2018-12-29 18:11:49 -0200
commitd51ec3db8ea15a3ec084cc75683ec737b1a78c32 (patch)
treeefd3710871a10d3fa270217de2a8a8d8166298cc /slides/website-slides
parentPrint realpath of generated files. (diff)
downloadeuandre.org-d51ec3db8ea15a3ec084cc75683ec737b1a78c32.tar.gz
euandre.org-d51ec3db8ea15a3ec084cc75683ec737b1a78c32.tar.xz
Improve usage message when arguments are missing.
Diffstat (limited to 'slides/website-slides')
-rwxr-xr-xslides/website-slides11
1 files changed, 6 insertions, 5 deletions
diff --git a/slides/website-slides b/slides/website-slides
index 8907333..e1ae31b 100755
--- a/slides/website-slides
+++ b/slides/website-slides
@@ -48,10 +48,11 @@ GetOptions(
'name|n=s' => \$name
) or pod2usage(-verbose => 1, -exitval => 2);
pod2usage(-verbose => 2, -exitval => 0) if $help;
-
-if (!$name) {
- die "Missing required --name argument.";
-}
+pod2usage(
+ -verbose => 1,
+ -exitval => 2,
+ -message => "Missing required --name argument."
+) if !$name;
my $dirname = dirname(__FILE__);
chdir $dirname ;
@@ -65,4 +66,4 @@ chdir "../";
copy("base.org", "$name/index.org") or die "Failed to copy base.org file: $!";
-print `realpath $name/index.org`; \ No newline at end of file
+print `realpath $name/index.org`;