From a4dad31c193854c40773bb7b6001e9d92184d705 Mon Sep 17 00:00:00 2001 From: espie Date: Sat, 20 Mar 2010 17:06:16 +0000 Subject: [PATCH] older code: use new methods code --- infrastructure/package/check-manpages | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/infrastructure/package/check-manpages b/infrastructure/package/check-manpages index 91aedccb7a1..3ebacd6e7da 100755 --- a/infrastructure/package/check-manpages +++ b/infrastructure/package/check-manpages @@ -1,5 +1,5 @@ #! /usr/bin/perl -# $OpenBSD: check-manpages,v 1.5 2005/09/13 20:48:41 espie Exp $ +# $OpenBSD: check-manpages,v 1.6 2010/03/20 17:06:16 espie Exp $ # # Copyright (c) 2004 Marc Espie # @@ -37,27 +37,27 @@ for my $pkgname (@ARGV) { print STDERR "$pkgname\n"; my $true_package = OpenBSD::PackageLocator->find($pkgname); next unless $true_package; - my $dir = $true_package->info(); + my $dir = $true_package->info; my $plist = OpenBSD::PackingList->fromfile($dir.CONTENTS); for my $item (@{$plist->{items}}) { - next unless $item->IsFile(); - my $n = $item->fullname(); + next unless $item->IsFile; + my $n = $item->fullname; if ($n =~ m,/man/(?:man.*?|cat.*?)/,) { my $file; do { - $file = $true_package->next(); + $file = $true_package->next; } while ($file->{name} ne $item->{name}); $file->{name} = $n; $n =~ m,^(.*/man)/(?:man.*?|cat.?)/,; $mandirs{"$extract_dir$1"} = 1; - $file->{cwd} = $item->cwd(); + $file->{cwd} = $item->cwd; $file->{destdir} = $extract_dir; - eval { $file->create(); }; + eval { $file->create; }; } } - $true_package->close(); - $true_package->wipe_info(); - $plist->forget(); + $true_package->close; + $true_package->wipe_info; + $plist->forget; } print STDERR "Running makewhatis in ", join(' ', keys(%mandirs)), "\n";