summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2009-11-10 11:36:57 +0000
committerMarc Espie <espie@cvs.openbsd.org>2009-11-10 11:36:57 +0000
commit40c978f2c294a4c9aa76b74c25d73136b694b27a (patch)
tree9425b5c92e2bfd066bd5af81180a7a4181c0a9e9
parentdc9c70c619b7537adbae2719745ecb81e1647f91 (diff)
bad espie: use strict/warnings consistently, and fix two nits and two
actual errors !
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Add.pm3
-rw-r--r--usr.sbin/pkg_add/OpenBSD/ArcCheck.pm11
-rw-r--r--usr.sbin/pkg_add/OpenBSD/CollisionReport.pm3
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Delete.pm3
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Dependencies.pm3
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Error.pm3
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Getopt.pm9
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Handle.pm13
-rw-r--r--usr.sbin/pkg_add/OpenBSD/IdCache.pm3
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Interactive.pm3
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackageInfo.pm3
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackageName.pm3
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingElement.pm3
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgConfig.pm4
-rw-r--r--usr.sbin/pkg_add/OpenBSD/ProgressMeter.pm3
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Replace.pm3
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Search.pm9
-rw-r--r--usr.sbin/pkg_add/OpenBSD/SharedItems.pm3
-rw-r--r--usr.sbin/pkg_add/OpenBSD/SharedLibs.pm3
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Subst.pm3
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Temp.pm3
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Tracker.pm9
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Update.pm4
-rw-r--r--usr.sbin/pkg_add/OpenBSD/UpdateSet.pm5
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Ustar.pm3
-rw-r--r--usr.sbin/pkg_add/pkg3
-rw-r--r--usr.sbin/pkg_add/pkg_add4
-rw-r--r--usr.sbin/pkg_add/pkg_audit3
-rw-r--r--usr.sbin/pkg_add/pkg_create3
-rw-r--r--usr.sbin/pkg_add/pkg_delete3
-rw-r--r--usr.sbin/pkg_add/pkg_info3
-rw-r--r--usr.sbin/pkg_add/pkg_merge3
-rw-r--r--usr.sbin/pkg_add/pkg_mklocatedb4
33 files changed, 85 insertions, 56 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Add.pm b/usr.sbin/pkg_add/OpenBSD/Add.pm
index bf9b3b27834..690fdc13186 100644
--- a/usr.sbin/pkg_add/OpenBSD/Add.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Add.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Add.pm,v 1.90 2009/10/27 11:45:22 espie Exp $
+# $OpenBSD: Add.pm,v 1.91 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -14,6 +14,7 @@
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
use strict;
use warnings;
diff --git a/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm b/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm
index 7b2fe10013d..96c308fd646 100644
--- a/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm
+++ b/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: ArcCheck.pm,v 1.12 2009/04/22 20:46:21 naddy Exp $
+# $OpenBSD: ArcCheck.pm,v 1.13 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2005-2006 Marc Espie <espie@openbsd.org>
#
@@ -20,7 +20,11 @@
# convention, the names LongName\d+ and LongLink\d correspond to names
# too long to fit. The actual names reside in the PLIST, but the archive
# is still a valid archive.
-#
+
+use strict;
+use warnings;
+
+use OpenBSD::Ustar;
package OpenBSD::Ustar::Object;
@@ -101,7 +105,8 @@ sub copy_long
if ($self->name =~ m/^LongName(\d+)$/o) {
$wrarc->{name_index} = $1 + 1;
}
- if (length($self->name) > MAXFILENAME+MAXPREFIX+1) {
+ if (length($self->name) >
+ OpenBSD::Ustar::MAXFILENAME + OpenBSD::Ustar::MAXPREFIX + 1) {
$wrarc->{name_index} = 0 if !defined $wrarc->{name_index};
$self->set_name('LongName'.$wrarc->{name_index}++);
}
diff --git a/usr.sbin/pkg_add/OpenBSD/CollisionReport.pm b/usr.sbin/pkg_add/OpenBSD/CollisionReport.pm
index 0ec4e9518b8..6bb9d1dd501 100644
--- a/usr.sbin/pkg_add/OpenBSD/CollisionReport.pm
+++ b/usr.sbin/pkg_add/OpenBSD/CollisionReport.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: CollisionReport.pm,v 1.19 2008/10/06 09:36:17 espie Exp $
+# $OpenBSD: CollisionReport.pm,v 1.20 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2003-2006 Marc Espie <espie@openbsd.org>
#
@@ -14,6 +14,7 @@
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
use strict;
use warnings;
diff --git a/usr.sbin/pkg_add/OpenBSD/Delete.pm b/usr.sbin/pkg_add/OpenBSD/Delete.pm
index 23fa4596612..47d689768b9 100644
--- a/usr.sbin/pkg_add/OpenBSD/Delete.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Delete.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Delete.pm,v 1.82 2009/10/11 11:01:44 espie Exp $
+# $OpenBSD: Delete.pm,v 1.83 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -17,6 +17,7 @@
use strict;
use warnings;
+
package OpenBSD::Delete;
use OpenBSD::Error;
use OpenBSD::Vstat;
diff --git a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm
index 59e0e6b5bf7..3d26a0c216a 100644
--- a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Dependencies.pm,v 1.80 2009/11/10 10:58:32 espie Exp $
+# $OpenBSD: Dependencies.pm,v 1.81 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2005-2007 Marc Espie <espie@openbsd.org>
#
@@ -13,7 +13,6 @@
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-#
use strict;
use warnings;
diff --git a/usr.sbin/pkg_add/OpenBSD/Error.pm b/usr.sbin/pkg_add/OpenBSD/Error.pm
index b232c77de20..ea1947f5f8b 100644
--- a/usr.sbin/pkg_add/OpenBSD/Error.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Error.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Error.pm,v 1.16 2008/10/21 21:06:19 espie Exp $
+# $OpenBSD: Error.pm,v 1.17 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2004 Marc Espie <espie@openbsd.org>
#
@@ -13,7 +13,6 @@
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-#
use strict;
use warnings;
diff --git a/usr.sbin/pkg_add/OpenBSD/Getopt.pm b/usr.sbin/pkg_add/OpenBSD/Getopt.pm
index cf91166e265..9b4da5e339e 100644
--- a/usr.sbin/pkg_add/OpenBSD/Getopt.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Getopt.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Getopt.pm,v 1.5 2008/03/08 11:32:38 espie Exp $
+# $OpenBSD: Getopt.pm,v 1.6 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2006 Marc Espie <espie@openbsd.org>
#
@@ -17,12 +17,13 @@
#
# This is inspired by Getopt::Std, except for the ability to invoke subs
# on options.
-#
-package OpenBSD::Getopt;
-require Exporter;
+
use strict;
use warnings;
+package OpenBSD::Getopt;
+require Exporter;
+
our @ISA = qw(Exporter);
our @EXPORT = qw(getopts);
diff --git a/usr.sbin/pkg_add/OpenBSD/Handle.pm b/usr.sbin/pkg_add/OpenBSD/Handle.pm
index e0b53db4fa4..64fd15014da 100644
--- a/usr.sbin/pkg_add/OpenBSD/Handle.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Handle.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Handle.pm,v 1.9 2009/11/08 12:16:23 espie Exp $
+# $OpenBSD: Handle.pm,v 1.10 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2007-2009 Marc Espie <espie@openbsd.org>
#
@@ -15,9 +15,12 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
# fairly non-descriptive name. Used to store various package information
# during installs and updates.
+
+use strict;
+use warnings;
+
package OpenBSD::Handle;
use OpenBSD::PackageInfo;
@@ -34,9 +37,11 @@ sub cleanup
my ($self, $error) = @_;
$self->{error} //= $error;
if (defined $self->location) {
- if ($self->{error} == ALREADY_INSTALLED) {
+ if (defined $self->{error} &&
+ $self->{error} == ALREADY_INSTALLED) {
$self->location->close_now;
- } elsif ($self->{error} == CANT_INSTALL) {
+ } elsif (defined $self->{error} &&
+ $self->{error} == CANT_INSTALL) {
$self->location->close_with_client_error;
}
$self->location->wipe_info;
diff --git a/usr.sbin/pkg_add/OpenBSD/IdCache.pm b/usr.sbin/pkg_add/OpenBSD/IdCache.pm
index de19ef6321a..c5ebdd3c68f 100644
--- a/usr.sbin/pkg_add/OpenBSD/IdCache.pm
+++ b/usr.sbin/pkg_add/OpenBSD/IdCache.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: IdCache.pm,v 1.4 2007/06/04 14:40:39 espie Exp $
+# $OpenBSD: IdCache.pm,v 1.5 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2002-2005 Marc Espie <espie@openbsd.org>
#
@@ -13,7 +13,6 @@
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-#
use strict;
use warnings;
diff --git a/usr.sbin/pkg_add/OpenBSD/Interactive.pm b/usr.sbin/pkg_add/OpenBSD/Interactive.pm
index 301882a99a8..cf533397f27 100644
--- a/usr.sbin/pkg_add/OpenBSD/Interactive.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Interactive.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Interactive.pm,v 1.9 2007/06/04 14:40:39 espie Exp $
+# $OpenBSD: Interactive.pm,v 1.10 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2005-2007 Marc Espie <espie@openbsd.org>
#
@@ -13,7 +13,6 @@
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-#
use strict;
use warnings;
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageInfo.pm b/usr.sbin/pkg_add/OpenBSD/PackageInfo.pm
index d50f6f40055..723ed8f918e 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackageInfo.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackageInfo.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackageInfo.pm,v 1.40 2009/11/10 11:10:52 espie Exp $
+# $OpenBSD: PackageInfo.pm,v 1.41 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -17,6 +17,7 @@
use strict;
use warnings;
+
package OpenBSD::PackageInfo;
our @ISA=qw(Exporter);
our @EXPORT=qw(installed_packages installed_info installed_name info_names is_info_name installed_stems
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageName.pm b/usr.sbin/pkg_add/OpenBSD/PackageName.pm
index f8cf8c57836..3f7b1f19c3e 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackageName.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackageName.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackageName.pm,v 1.35 2009/06/10 14:40:03 espie Exp $
+# $OpenBSD: PackageName.pm,v 1.36 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -17,6 +17,7 @@
use strict;
use warnings;
+
package OpenBSD::PackageName;
sub url2pkgname($)
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
index c0418214303..1ab90c8978c 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackingElement.pm,v 1.157 2009/11/03 11:03:19 espie Exp $
+# $OpenBSD: PackingElement.pm,v 1.158 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -17,6 +17,7 @@
use strict;
use warnings;
+
use OpenBSD::PackageInfo;
use OpenBSD::Paths;
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgConfig.pm b/usr.sbin/pkg_add/OpenBSD/PkgConfig.pm
index 7ec5d4dab12..8dc33792cc9 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgConfig.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgConfig.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PkgConfig.pm,v 1.12 2008/10/20 10:25:16 espie Exp $
+# $OpenBSD: PkgConfig.pm,v 1.13 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2006 Marc Espie <espie@openbsd.org>
#
@@ -13,7 +13,7 @@
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-#
+
use strict;
use warnings;
diff --git a/usr.sbin/pkg_add/OpenBSD/ProgressMeter.pm b/usr.sbin/pkg_add/OpenBSD/ProgressMeter.pm
index 47d91dbba23..2543feb63f4 100644
--- a/usr.sbin/pkg_add/OpenBSD/ProgressMeter.pm
+++ b/usr.sbin/pkg_add/OpenBSD/ProgressMeter.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: ProgressMeter.pm,v 1.12 2009/10/14 10:38:06 espie Exp $
+# $OpenBSD: ProgressMeter.pm,v 1.13 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2004-2007 Marc Espie <espie@openbsd.org>
#
@@ -13,7 +13,6 @@
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-#
use strict;
use warnings;
diff --git a/usr.sbin/pkg_add/OpenBSD/Replace.pm b/usr.sbin/pkg_add/OpenBSD/Replace.pm
index 8b65a2d344e..d0adb8e56e1 100644
--- a/usr.sbin/pkg_add/OpenBSD/Replace.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Replace.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Replace.pm,v 1.51 2009/10/15 10:45:47 espie Exp $
+# $OpenBSD: Replace.pm,v 1.52 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2004-2006 Marc Espie <espie@openbsd.org>
#
@@ -13,7 +13,6 @@
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-#
use strict;
use warnings;
diff --git a/usr.sbin/pkg_add/OpenBSD/Search.pm b/usr.sbin/pkg_add/OpenBSD/Search.pm
index 09103bc5d5b..bc3f857bc7a 100644
--- a/usr.sbin/pkg_add/OpenBSD/Search.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Search.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Search.pm,v 1.13 2009/11/09 17:54:55 espie Exp $
+# $OpenBSD: Search.pm,v 1.14 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2007 Marc Espie <espie@openbsd.org>
#
@@ -15,6 +15,9 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+use strict;
+use warnings;
+
package OpenBSD::Search;
sub match_locations
{
@@ -62,7 +65,7 @@ sub match_locations
sub filter_locations
{
my ($self, $l) = @_;
- return $self->{$spec}->match_locations($l);
+ return $self->{spec}->match_locations($l);
}
sub filter
@@ -135,7 +138,7 @@ sub filter
my @result = ();
require OpenBSD::PackageName;
for my $pkg (@l) {
- if ($self->_keep(OpenBSD::PackageName::splitstem($pkgname))) {
+ if ($self->_keep(OpenBSD::PackageName::splitstem($pkg))) {
push(@result, $pkg);
}
}
diff --git a/usr.sbin/pkg_add/OpenBSD/SharedItems.pm b/usr.sbin/pkg_add/OpenBSD/SharedItems.pm
index fcc01e43fc5..6ece9d43e43 100644
--- a/usr.sbin/pkg_add/OpenBSD/SharedItems.pm
+++ b/usr.sbin/pkg_add/OpenBSD/SharedItems.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: SharedItems.pm,v 1.13 2007/06/20 13:44:40 espie Exp $
+# $OpenBSD: SharedItems.pm,v 1.14 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2004-2006 Marc Espie <espie@openbsd.org>
#
@@ -17,6 +17,7 @@
use strict;
use warnings;
+
package OpenBSD::SharedItems;
use OpenBSD::Error;
diff --git a/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm b/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm
index a1ceab9d1fe..bd7e73098f1 100644
--- a/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm
+++ b/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: SharedLibs.pm,v 1.32 2008/10/20 10:25:16 espie Exp $
+# $OpenBSD: SharedLibs.pm,v 1.33 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2003-2005 Marc Espie <espie@openbsd.org>
#
@@ -17,6 +17,7 @@
use strict;
use warnings;
+
use OpenBSD::Paths;
package OpenBSD::PackingElement;
diff --git a/usr.sbin/pkg_add/OpenBSD/Subst.pm b/usr.sbin/pkg_add/OpenBSD/Subst.pm
index 732b7e47e3e..78944305a02 100644
--- a/usr.sbin/pkg_add/OpenBSD/Subst.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Subst.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Subst.pm,v 1.7 2008/10/20 10:25:16 espie Exp $
+# $OpenBSD: Subst.pm,v 1.8 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2008 Marc Espie <espie@openbsd.org>
#
@@ -14,6 +14,7 @@
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
use strict;
use warnings;
diff --git a/usr.sbin/pkg_add/OpenBSD/Temp.pm b/usr.sbin/pkg_add/OpenBSD/Temp.pm
index 3c33c5104e0..796da4f194c 100644
--- a/usr.sbin/pkg_add/OpenBSD/Temp.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Temp.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Temp.pm,v 1.14 2009/04/19 14:58:32 espie Exp $
+# $OpenBSD: Temp.pm,v 1.15 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2003-2005 Marc Espie <espie@openbsd.org>
#
@@ -17,6 +17,7 @@
use strict;
use warnings;
+
package OpenBSD::Temp;
use File::Temp;
diff --git a/usr.sbin/pkg_add/OpenBSD/Tracker.pm b/usr.sbin/pkg_add/OpenBSD/Tracker.pm
index a5c35e69688..ce505d2c4f0 100644
--- a/usr.sbin/pkg_add/OpenBSD/Tracker.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Tracker.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Tracker.pm,v 1.7 2009/11/10 10:28:12 espie Exp $
+# $OpenBSD: Tracker.pm,v 1.8 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2009 Marc Espie <espie@openbsd.org>
#
@@ -13,10 +13,6 @@
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-#
-
-use strict;
-use warnings;
# In order to deal with dependencies, we have to know what's actually installed,
# and what can actually be updated.
@@ -32,6 +28,9 @@ use warnings;
# the Tracker object does maintain that information globally so that
# Update/Dependencies can do its job.
+use strict;
+use warnings;
+
package OpenBSD::Tracker;
sub new
{
diff --git a/usr.sbin/pkg_add/OpenBSD/Update.pm b/usr.sbin/pkg_add/OpenBSD/Update.pm
index 6ddd417203b..53b5dfd42a6 100644
--- a/usr.sbin/pkg_add/OpenBSD/Update.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Update.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Update.pm,v 1.90 2009/11/09 17:50:24 espie Exp $
+# $OpenBSD: Update.pm,v 1.91 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2004-2006 Marc Espie <espie@openbsd.org>
#
@@ -13,7 +13,7 @@
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-#
+
use strict;
use warnings;
diff --git a/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm b/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm
index fe703e4b359..6e19b6a08f0 100644
--- a/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm
+++ b/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: UpdateSet.pm,v 1.14 2009/11/10 10:35:56 espie Exp $
+# $OpenBSD: UpdateSet.pm,v 1.15 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2007 Marc Espie <espie@openbsd.org>
#
@@ -19,6 +19,9 @@
# these things don't really live here, they're just stuff that's shared
# between pkg_add and pkg_delete, so to avoid yes another header...
+use strict;
+use warnings;
+
package OpenBSD::SharedItemsRecorder;
sub new
{
diff --git a/usr.sbin/pkg_add/OpenBSD/Ustar.pm b/usr.sbin/pkg_add/OpenBSD/Ustar.pm
index a92bec84004..385b90f804e 100644
--- a/usr.sbin/pkg_add/OpenBSD/Ustar.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Ustar.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Ustar.pm,v 1.51 2009/04/19 14:58:32 espie Exp $
+# $OpenBSD: Ustar.pm,v 1.52 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2002-2007 Marc Espie <espie@openbsd.org>
#
@@ -19,6 +19,7 @@
use strict;
use warnings;
+
package OpenBSD::Ustar;
use constant {
diff --git a/usr.sbin/pkg_add/pkg b/usr.sbin/pkg_add/pkg
index 97e7a07cd73..0f6d8dc2d60 100644
--- a/usr.sbin/pkg_add/pkg
+++ b/usr.sbin/pkg_add/pkg
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: pkg,v 1.10 2009/04/19 14:58:32 espie Exp $
+# $OpenBSD: pkg,v 1.11 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -18,6 +18,7 @@
use strict;
use warnings;
+
use Getopt::Std;
sub check_dependencies($)
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add
index 63f300a8429..99beac08ba9 100644
--- a/usr.sbin/pkg_add/pkg_add
+++ b/usr.sbin/pkg_add/pkg_add
@@ -1,7 +1,7 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: pkg_add,v 1.374 2009/11/09 17:47:59 espie Exp $
+# $OpenBSD: pkg_add,v 1.375 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2003-2009 Marc Espie <espie@openbsd.org>
#
@@ -17,9 +17,9 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-# this is it ! The hard one
use strict;
use warnings;
+
use OpenBSD::Dependencies;
use OpenBSD::PackingList;
use OpenBSD::PackageInfo;
diff --git a/usr.sbin/pkg_add/pkg_audit b/usr.sbin/pkg_add/pkg_audit
index 8a60972c5e9..084d047e2d0 100644
--- a/usr.sbin/pkg_add/pkg_audit
+++ b/usr.sbin/pkg_add/pkg_audit
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: pkg_audit,v 1.6 2009/04/19 14:58:32 espie Exp $
+# $OpenBSD: pkg_audit,v 1.7 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -18,6 +18,7 @@
use strict;
use warnings;
+
use OpenBSD::PackingList;
use OpenBSD::PackageInfo;
use File::Find;
diff --git a/usr.sbin/pkg_add/pkg_create b/usr.sbin/pkg_add/pkg_create
index 364e35a22dd..d2965d73cb6 100644
--- a/usr.sbin/pkg_add/pkg_create
+++ b/usr.sbin/pkg_add/pkg_create
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: pkg_create,v 1.122 2009/06/10 15:44:05 espie Exp $
+# $OpenBSD: pkg_create,v 1.123 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -18,6 +18,7 @@
use strict;
use warnings;
+
use OpenBSD::PackingList;
use OpenBSD::PackageInfo;
use OpenBSD::Getopt;
diff --git a/usr.sbin/pkg_add/pkg_delete b/usr.sbin/pkg_add/pkg_delete
index d99dc0819ce..91128464b22 100644
--- a/usr.sbin/pkg_add/pkg_delete
+++ b/usr.sbin/pkg_add/pkg_delete
@@ -1,6 +1,6 @@
#!/usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: pkg_delete,v 1.115 2009/11/10 11:13:59 espie Exp $
+# $OpenBSD: pkg_delete,v 1.116 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -18,6 +18,7 @@
use strict;
use warnings;
+
use OpenBSD::Getopt;
use OpenBSD::PackingList;
use OpenBSD::RequiredBy;
diff --git a/usr.sbin/pkg_add/pkg_info b/usr.sbin/pkg_add/pkg_info
index cf3559b113e..7fcf6d5161e 100644
--- a/usr.sbin/pkg_add/pkg_info
+++ b/usr.sbin/pkg_add/pkg_info
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: pkg_info,v 1.80 2009/11/10 10:52:44 espie Exp $
+# $OpenBSD: pkg_info,v 1.81 2009/11/10 11:36:56 espie Exp $
#
# Copyright (c) 2003-2009 Marc Espie <espie@openbsd.org>
#
@@ -18,6 +18,7 @@
use strict;
use warnings;
+
use OpenBSD::PackageInfo;
use OpenBSD::PackageName;
use OpenBSD::Getopt;
diff --git a/usr.sbin/pkg_add/pkg_merge b/usr.sbin/pkg_add/pkg_merge
index b0ccbc6196d..cf75a12b05b 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.12 2008/10/10 04:35:31 steven Exp $
+# $OpenBSD: pkg_merge,v 1.13 2009/11/10 11:36:56 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
@@ -16,6 +16,7 @@
use strict;
use warnings;
+
use OpenBSD::PackageLocator;
use OpenBSD::PackageInfo;
use OpenBSD::PackingList;
diff --git a/usr.sbin/pkg_add/pkg_mklocatedb b/usr.sbin/pkg_add/pkg_mklocatedb
index a1cb69db062..e50ab4d4eb3 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-2007 Marc Espie <espie@openbsd.org>
-# $OpenBSD: pkg_mklocatedb,v 1.20 2008/10/20 10:25:16 espie Exp $
+# $OpenBSD: pkg_mklocatedb,v 1.21 2009/11/10 11:36:56 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
@@ -15,6 +15,8 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
use strict;
+use warnings;
+
use OpenBSD::PackageLocator;
use OpenBSD::PackageInfo;
use OpenBSD::PackingList;