summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-07-01 15:45:04 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-07-01 15:45:04 +0200
commit47c5fa5dfccf83a078673ba4703c75be0974fa3e (patch)
tree58efb012a8ec8b5d461532a23de9580dd39f5f2e
parent8634364e8bb45cfaf0d52a0358d1bc0ac201ce22 (diff)
envstore: Use Pod::Usage
-rwxr-xr-xbin/envstore10
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/envstore b/bin/envstore
index 414d4a3..936a584 100755
--- a/bin/envstore
+++ b/bin/envstore
@@ -4,6 +4,7 @@
## License: WTFPL <http://sam.zoy.org/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 {