summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2011-07-12 10:22:30 +0000
committerMarc Espie <espie@cvs.openbsd.org>2011-07-12 10:22:30 +0000
commitbc67dd383c0085c3a7f952fd6f2f6a52e5f339ee (patch)
tree3496d4e1375937a0e1d4ba22efc62d0098f9bddd
parentbc2539179e3d205f1a089149b2f5abf561a0d3bd (diff)
refactor
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgSpec.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm b/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm
index 8a65d7ec442..2ce2d592923 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PkgSpec.pm,v 1.36 2011/07/02 12:12:58 espie Exp $
+# $OpenBSD: PkgSpec.pm,v 1.37 2011/07/12 10:22:29 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -23,8 +23,6 @@ sub new
{
my ($class, $spec) = @_;
- $spec =~ s/^-//o;
-
bless \$spec, $class;
}
@@ -62,7 +60,6 @@ our @ISA = qw(OpenBSD::PkgSpec::flavorspec);
sub new
{
my ($class, $value) = @_;
- $value =~ s/^\-//;
bless {map{($_, 1)} split(/\-/, $value)}, $class;
}
@@ -194,6 +191,7 @@ sub parse
return undef;
}
($r->{stemspec}, $r->{vspec}, $r->{flavorspec}) = ($1, $2, $3);
+ $r->{flavorspec} =~ s/^\-//;
$r->{stemspec} =~ s/\./\\\./go;
$r->{stemspec} =~ s/\+/\\\+/go;