diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2010-06-09 11:57:22 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2010-06-09 11:57:22 +0000 |
commit | 09b51e337955688b088f6d4bbed524f0fcb192a9 (patch) | |
tree | 11b3f84a175a9d12122fedc5fd85adef6362b9de /usr.sbin/pkg_add/pkg_mklocatedb | |
parent | 6f13ba21d6f7260f387090f2ae88e4948e93e2a8 (diff) |
common pattern reuse
Diffstat (limited to 'usr.sbin/pkg_add/pkg_mklocatedb')
-rw-r--r-- | usr.sbin/pkg_add/pkg_mklocatedb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.sbin/pkg_add/pkg_mklocatedb b/usr.sbin/pkg_add/pkg_mklocatedb index 39d2b7c0ee1..2f4353137b1 100644 --- a/usr.sbin/pkg_add/pkg_mklocatedb +++ b/usr.sbin/pkg_add/pkg_mklocatedb @@ -1,6 +1,6 @@ #! /usr/bin/perl # Copyright (c) 2005-2010 Marc Espie <espie@openbsd.org> -# $OpenBSD: pkg_mklocatedb,v 1.25 2010/06/09 10:58:01 espie Exp $ +# $OpenBSD: pkg_mklocatedb,v 1.26 2010/06/09 11:57:21 espie Exp $ # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -73,11 +73,7 @@ sub tag return $r; } -try { - getopts('ad:nqs:x:r:p:P'); -} catchall { - $ui->usage($_); -}; +$ui->do_options(sub { getopts('ad:nqs:x:r:p:P'); }); my $fh; my $MKLOCATEDB = OpenBSD::Paths->mklocatedb; |