From 47c5fa5dfccf83a078673ba4703c75be0974fa3e Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 1 Jul 2009 15:45:04 +0200 Subject: envstore: Use Pod::Usage --- bin/envstore | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/envstore b/bin/envstore index 414d4a3..936a584 100755 --- a/bin/envstore +++ b/bin/envstore @@ -4,6 +4,7 @@ ## License: WTFPL use strict; use warnings; +use Pod::Usage; use Simplestore; my $store_file = "/tmp/.envstore-$>"; @@ -14,8 +15,13 @@ my $arg2 = shift; my ($key, $value); sub usage { - print STDERR "Invalid invocation - see perldoc -F $0\n"; - exit(1); + pod2usage( + -message => 'Syntax error', + -exitval => 1, + -verbose => 99, + -sections => 'SYNOPSIS|DESCRIPTION', + -output => \*STDERR, + ); } sub check_store { -- cgit v1.2.3