diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-06-01 20:39:42 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-06-01 20:39:42 +0000 |
commit | 8975bdd33386bb1b22a0e25992d8f805a420121f (patch) | |
tree | e8bebc4c1ceed5f73d998d3dced6ac471acfec8f /usr.sbin/pkg_add/OpenBSD/PackingElement.pm | |
parent | 23df0e0d4565437d6963dc1574b7d808cb1a8a24 (diff) |
micro-optimizations
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PackingElement.pm')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index a5bc2ba33ef..7d823d6c89a 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.124 2007/05/31 13:20:27 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.125 2007/06/01 20:39:41 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -31,13 +31,14 @@ our %keyword; sub create { my ($class, $line, $plist) = @_; - if ($line =~ m/^\@(\S+)\s*(.*)/) { + if ($line =~ m/^\@(\S+)\s*(.*)$/o) { if (defined $keyword{$1}) { $keyword{$1}->add($plist, $2); } else { die "Unknown element: $line"; } } else { + chomp $line; OpenBSD::PackingElement::File->add($plist, $line); } } |