summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/Replace.pm
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-06-04 14:40:40 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-06-04 14:40:40 +0000
commit8a3fdf46bd93e71794fcec29cb31017529d8ec57 (patch)
tree8721baf5d52b0079af9d143523c9b5d0a8cd2bef /usr.sbin/pkg_add/OpenBSD/Replace.pm
parentcc4e44748b6a845f1f2d35fc2fe8753cb8b89300 (diff)
some minor systematic changes.
- mark all regexps I can with /o if they can be compiled once. - turn $o->method() into $o->method - remove unneeded prototypes - reduce split /re/ into split "string" where possible.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/Replace.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Replace.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Replace.pm b/usr.sbin/pkg_add/OpenBSD/Replace.pm
index 1991c8bef1b..da572cfefff 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.30 2007/06/01 22:35:46 espie Exp $
+# $OpenBSD: Replace.pm,v 1.31 2007/06/04 14:40:39 espie Exp $
#
# Copyright (c) 2004-2006 Marc Espie <espie@openbsd.org>
#
@@ -199,7 +199,7 @@ sub mark_lib
{
my ($self, $libs, $libpatterns) = @_;
my $libname = $self->fullname;
- if ($libname =~ m/^(.*\.so\.)(\d+)\.(\d+)$/) {
+ if ($libname =~ m/^(.*\.so\.)(\d+)\.(\d+)$/o) {
$libpatterns->{$1} = [$2, $3, $libname];
}
$libs->{$libname} = 1;
@@ -209,7 +209,7 @@ sub unmark_lib
{
my ($self, $libs, $libpatterns) = @_;
my $libname = $self->fullname;
- if ($libname =~ m/^(.*\.so\.)(\d+)\.(\d+)$/) {
+ if ($libname =~ m/^(.*\.so\.)(\d+)\.(\d+)$/o) {
my ($pat, $major, $minor) = ($1, $2, $3);
my $p = $libpatterns->{$pat};
if (defined $p && $p->[0] == $major && $p->[1] <= $minor) {
@@ -325,7 +325,7 @@ sub split_libs
$splitted->set_pkgname(".libs-".$plist->pkgname);
if (defined $plist->{conflict}) {
for my $item (@{$plist->{conflict}}) {
- $item->clone()->add_object($splitted);
+ $item->clone->add_object($splitted);
}
}
if (defined $plist->{'no-default-conflict'}) {