diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-06-04 14:57:34 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-06-04 14:57:34 +0000 |
commit | c84619ff9fce6a775a11ea33bc32175591c1584f (patch) | |
tree | 41530734f6a01324bddf5d68528a28ae3a1b80bc /usr.sbin/pkg_add | |
parent | 3ecbd34a160f4de0ad5a1f2af518f23766613210 (diff) |
I am on drugs, I don't know where I found split can take strings as
arguments. Repair...
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackageLocator.pm | 4 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackageName.pm | 8 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 10 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PkgConfig.pm | 4 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PkgSpec.pm | 14 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Search.pm | 4 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/SharedLibs.pm | 4 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Vstat.pm | 4 | ||||
-rw-r--r-- | usr.sbin/pkg_add/pkg_add | 6 | ||||
-rw-r--r-- | usr.sbin/pkg_add/pkg_delete | 6 | ||||
-rw-r--r-- | usr.sbin/pkg_add/pkg_mklocatedb | 2 |
11 files changed, 33 insertions, 33 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm b/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm index 79a9e2c6944..77e61356d14 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackageLocator.pm,v 1.72 2007/06/04 14:40:39 espie Exp $ +# $OpenBSD: PackageLocator.pm,v 1.73 2007/06/04 14:57:33 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -33,7 +33,7 @@ if (defined $ENV{PKG_PATH}) { my $v = $ENV{PKG_PATH}; $v =~ s/^\:+//o; $v =~ s/\:+$//o; - my @tentative = split '/:', $v; + my @tentative = split /\/\:/o, $v; while (my $i = shift @tentative) { $i =~ m|/$|o or $i.='/'; $pkgpath->add(OpenBSD::PackageRepository->new($i)); diff --git a/usr.sbin/pkg_add/OpenBSD/PackageName.pm b/usr.sbin/pkg_add/OpenBSD/PackageName.pm index 711f20abd81..3cc4fd561f1 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.28 2007/06/04 14:40:39 espie Exp $ +# $OpenBSD: PackageName.pm,v 1.29 2007/06/04 14:57:33 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -35,7 +35,7 @@ sub splitname if (/\-(?=\d)/o) { my $stem = $`; my $rest = $'; - my @all = split '-', $rest; + my @all = split /\-/o, $rest; return ($stem, @all); } else { return ($_); @@ -49,7 +49,7 @@ sub from_string if (/\-(?=\d)/o) { my $stem = $`; my $rest = $'; - my @all = split '-', $rest; + my @all = split /\-/o, $rest; my $version = OpenBSD::PackageName::version->from_string(shift @all); my %flavors = map {($_,1)} @all; return bless { @@ -187,7 +187,7 @@ package OpenBSD::PackageName::version; sub make_dewey { my $o = shift; - $o->{deweys} = [ split('.', $o->{string}) ]; + $o->{deweys} = [ split(/\./o, $o->{string}) ]; for my $suffix (qw(rc beta pre pl)) { if ($o->{deweys}->[-1] =~ m/^(\d+)$suffix(\d*)$/) { $o->{deweys}->[-1] = $1; diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index bb2a8a93b4e..ed97daa368a 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.128 2007/06/04 14:42:19 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.129 2007/06/04 14:57:33 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -726,7 +726,7 @@ sub category() { "depend" } sub new { my ($class, $args) = @_; - my ($pkgpath, $pattern, $def) = split ':', $args; + my ($pkgpath, $pattern, $def) = split /\:/o, $args; bless { name => $def, pkgpath => $pkgpath, pattern => $pattern, def => $def }, $class; } @@ -791,7 +791,7 @@ sub new { my ($class, $args) = @_; my ($name, $uid, $group, $loginclass, $comment, $home, $shell) = - split ':', $args; + split /\:/o, $args; bless { name => $name, uid => $uid, group => $group, class => $loginclass, comment => $comment, home => $home, shell => $shell }, $class; @@ -849,7 +849,7 @@ __PACKAGE__->register_with_factory; sub new { my ($class, $args) = @_; - my ($name, $gid) = split ':', $args; + my ($name, $gid) = split /\:/o, $args; bless { name => $name, gid => $gid }, $class; } @@ -1341,7 +1341,7 @@ __PACKAGE__->register_with_factory; sub new { my ($class, $args) = @_; - my @arches= split(',', $args); + my @arches= split(/\,/o, $args); bless { arches => \@arches }, $class; } diff --git a/usr.sbin/pkg_add/OpenBSD/PkgConfig.pm b/usr.sbin/pkg_add/OpenBSD/PkgConfig.pm index 6b8e706148e..1ff9d3f5ddd 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.9 2006/12/04 11:29:02 espie Exp $ +# $OpenBSD: PkgConfig.pm,v 1.10 2007/06/04 14:57:33 espie Exp $ # # Copyright (c) 2006 Marc Espie <espie@openbsd.org> # @@ -73,7 +73,7 @@ sub add_property if (defined $parse->{$name}) { $v = $parse->{$name}($value); } else { - $v = [split /\s+/, $value] ; + $v = [split /\s+/o, $value] ; } } else { $v = []; diff --git a/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm b/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm index ae9271c3713..6c5821bcc0f 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.13 2007/06/04 14:40:39 espie Exp $ +# $OpenBSD: PkgSpec.pm,v 1.14 2007/06/04 14:57:33 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -61,9 +61,9 @@ sub dewey_compare $pb = $1; } - my @a = split('.', $a); + my @a = split(/\./o, $a); push @a, $pa if defined $pa; # ... and restore them - my @b = split("\\.", $b); + my @b = split(/\\\./o, $b); push @b, $pb if defined $pb; while (@a > 0 && @b > 0) { my $va = shift @a; @@ -86,7 +86,7 @@ sub check_version # any version spec return 1 if $spec eq '.*'; - my @specs = split(',', $spec); + my @specs = split(/\,/o, $spec); for (grep /^\d/o, @specs) { # exact number: check match return 1 if $v =~ /^$_$/; return 1 if $v =~ /^${_}p\d+$/; # allows for recent patches @@ -114,7 +114,7 @@ sub check_1flavor my ($f, $spec) = @_; local $_; - for (split '-', $spec) { + for (split /\-/o, $spec) { # must not be here if (m/^\!/o) { return 0 if $f->{$'}; @@ -135,10 +135,10 @@ sub check_flavor $spec =~ s/^-//o; # retrieve all flavors - my %f = map +($_, 1), split '-', $f; + my %f = map +($_, 1), split /\-/o, $f; # check each flavor constraint - for (split ',', $spec) { + for (split /\,/o, $spec) { if (check_1flavor(\%f, $_)) { return 1; } diff --git a/usr.sbin/pkg_add/OpenBSD/Search.pm b/usr.sbin/pkg_add/OpenBSD/Search.pm index 7905e63264a..21db9b2792e 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.6 2007/06/04 14:40:39 espie Exp $ +# $OpenBSD: Search.pm,v 1.7 2007/06/04 14:57:33 espie Exp $ # # Copyright (c) 2007 Marc Espie <espie@openbsd.org> # @@ -67,7 +67,7 @@ sub filter sub new { my ($class, $pattern) = @_; - my @l = split '|', $pattern; + my @l = split /\|/o, $pattern; bless { patterns => \@l }, $class; } diff --git a/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm b/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm index 553fd9cfe6c..3fd4663d0c2 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.17 2007/06/04 14:40:39 espie Exp $ +# $OpenBSD: SharedLibs.pm,v 1.18 2007/06/04 14:57:33 espie Exp $ # # Copyright (c) 2003-2005 Marc Espie <espie@openbsd.org> # @@ -51,7 +51,7 @@ sub init_path($) local $_; while (<$fh>) { if (m/^\s*search directories:\s*(.*?)\s*$/o) { - for my $d (split(':', $1)) { + for my $d (split(/\:/o, $1)) { $path->{$d} = 1; } } diff --git a/usr.sbin/pkg_add/OpenBSD/Vstat.pm b/usr.sbin/pkg_add/OpenBSD/Vstat.pm index 456e3964087..98f3da05f81 100644 --- a/usr.sbin/pkg_add/OpenBSD/Vstat.pm +++ b/usr.sbin/pkg_add/OpenBSD/Vstat.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Vstat.pm,v 1.32 2007/06/04 14:40:39 espie Exp $ +# $OpenBSD: Vstat.pm,v 1.33 2007/06/04 14:57:33 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -55,7 +55,7 @@ sub init_devices() my $i = create_device($dev); next unless defined $i; next unless defined $opts; - for my $o (split /,\s*/, $opts) { + for my $o (split /\,\s*/o, $opts) { if ($o eq 'read-only') { $i->{ro} = 1; } elsif ($o eq 'nodev') { diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add index 3a4fb8a41de..8c174747f50 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.309 2007/06/04 14:40:39 espie Exp $ +# $OpenBSD: pkg_add,v 1.310 2007/06/04 14:57:33 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -580,12 +580,12 @@ try { {'v' => sub {++$opt_v;}, 'h' => sub { Usage(); }, 'F' => sub { - for my $o (split ',', shift) { + for my $o (split /\,/o, shift) { $forced{$o} = 1; } }, 'f' => sub { - for my $o (split ',', shift) { + for my $o (split /\,/o, shift) { $forced{$o} = 1; } }}); diff --git a/usr.sbin/pkg_add/pkg_delete b/usr.sbin/pkg_add/pkg_delete index 9e41ae146b8..c35863fdf17 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.107 2007/06/04 14:40:39 espie Exp $ +# $OpenBSD: pkg_delete,v 1.108 2007/06/04 14:57:33 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -46,12 +46,12 @@ try { {'v' => sub {++$opt_v;}, 'h' => sub { Usage(); }, 'F' => sub { - for my $o (split ',', shift) { + for my $o (split /\,/o, shift) { $forced{$o} = 1; } }, 'f' => sub { - for my $o (split ',', shift) { + for my $o (split /\,/o, shift) { $forced{$o} = 1; } }}); diff --git a/usr.sbin/pkg_add/pkg_mklocatedb b/usr.sbin/pkg_add/pkg_mklocatedb index 3cfd94dccb5..7e562aa8a40 100644 --- a/usr.sbin/pkg_add/pkg_mklocatedb +++ b/usr.sbin/pkg_add/pkg_mklocatedb @@ -82,7 +82,7 @@ if ($opt_n or -t STDOUT) { open $fh, "|-", $MKLOCATEDB, $MKLOCATEDB or die "couldn't open pipe: $!"; } if ($opt_s || $opt_x) { - my ($rev, $arch) = split(' ', `uname -mr`); + my ($rev, $arch) = split(/\s+/o, `uname -mr`); chomp $arch; $rev =~ s/\.//; if ($opt_s) { |