summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/pkg_merge
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2010-06-09 11:57:22 +0000
committerMarc Espie <espie@cvs.openbsd.org>2010-06-09 11:57:22 +0000
commit09b51e337955688b088f6d4bbed524f0fcb192a9 (patch)
tree11b3f84a175a9d12122fedc5fd85adef6362b9de /usr.sbin/pkg_add/pkg_merge
parent6f13ba21d6f7260f387090f2ae88e4948e93e2a8 (diff)
common pattern reuse
Diffstat (limited to 'usr.sbin/pkg_add/pkg_merge')
-rw-r--r--usr.sbin/pkg_add/pkg_merge8
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.sbin/pkg_add/pkg_merge b/usr.sbin/pkg_add/pkg_merge
index bb4c70f2c82..b65ac17eb0d 100644
--- a/usr.sbin/pkg_add/pkg_merge
+++ b/usr.sbin/pkg_add/pkg_merge
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# Copyright (c) 2005-2007 Marc Espie <espie@openbsd.org>
-# $OpenBSD: pkg_merge,v 1.15 2010/06/09 10:58:01 espie Exp $
+# $OpenBSD: pkg_merge,v 1.16 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
@@ -133,11 +133,7 @@ $ui->usage_is('[-v] -o result pkg pkg2 ...');
our ($opt_o, $opt_v);
-try {
- getopts('o:v');
-} catchall {
- $ui->usage($_);
-};
+$ui->do_options(sub { getopts('o:v'); });
if (!defined $opt_o) {
$ui->usage("Missing -o result");