diff options
Diffstat (limited to '')
-rwxr-xr-x | pastebin/website-pastebin | 15 | ||||
-rwxr-xr-x | slides/website-slides | 11 |
2 files changed, 15 insertions, 11 deletions
diff --git a/pastebin/website-pastebin b/pastebin/website-pastebin index a964449..0426584 100755 --- a/pastebin/website-pastebin +++ b/pastebin/website-pastebin @@ -46,11 +46,15 @@ GetOptions( 'help|h|?' => \$help, 'title|t=s' => \$title ) or pod2usage(-verbose => 1, -exitval => 2); -pod2usage(-verbose => 2, -exitval => 0) if $help; - -if (!$title) { - die "Missing required --title argument."; -} +pod2usage( + -verbose => 2, + -exitval => 0 +) if $help; +pod2usage( + -verbose => 1, + -exitval => 2, + -message => "Missing required --title argument." +) if !$title; # Taken from: # https://stackoverflow.com/a/4009519 @@ -65,7 +69,6 @@ sub slugify { return $input; } - our $dirname = dirname(__FILE__); our $in = "$dirname/skeleton.org"; our $out; 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`; |