← Index
NYTProf Performance Profile   « line view »
For /usr/sbin/pkg_info
  Run on Mon Aug 7 09:39:31 2017
Reported on Mon Aug 7 09:40:21 2017

Filename/usr/libdata/perl5/OpenBSD/PackageLocation.pm
StatementsExecuted 5402 statements in 74.2ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11126.7ms27.9msOpenBSD::PackageLocation::::BEGIN@24 OpenBSD::PackageLocation::BEGIN@24
401123.1ms12.0sOpenBSD::PackageLocation::::info OpenBSD::PackageLocation::info
40119.47ms11.9sOpenBSD::PackageLocation::::grab_info OpenBSD::PackageLocation::grab_info
160218.55ms11.7sOpenBSD::PackageLocation::::_opened OpenBSD::PackageLocation::_opened
120223.76ms6.53msOpenBSD::PackageLocation::::deref OpenBSD::PackageLocation::deref
120213.22ms84.3msOpenBSD::PackageLocation::::next OpenBSD::PackageLocation::next
40112.45ms2.45msOpenBSD::PackageLocation::::CORE:print OpenBSD::PackageLocation::CORE:print (opcode)
40111.88ms121msOpenBSD::PackageLocation::::find_contents OpenBSD::PackageLocation::find_contents
40111.73ms1.73msOpenBSD::PackageLocation::::CORE:open OpenBSD::PackageLocation::CORE:open (opcode)
40111.33ms54.9msOpenBSD::PackageLocation::::wipe_info OpenBSD::PackageLocation::wipe_info
80211.32ms11.8sOpenBSD::PackageLocation::::contents OpenBSD::PackageLocation::contents
416321.12ms1.12msOpenBSD::PackageLocation::::name OpenBSD::PackageLocation::name
40111.11ms1.11msOpenBSD::PackageLocation::::CORE:ftfile OpenBSD::PackageLocation::CORE:ftfile (opcode)
40111.07ms1.07msOpenBSD::PackageLocation::::CORE:close OpenBSD::PackageLocation::CORE:close (opcode)
12011985µs80.4msOpenBSD::PackageLocation::::getNext OpenBSD::PackageLocation::getNext
4011836µs836µsOpenBSD::PackageLocation::::_set_callback OpenBSD::PackageLocation::_set_callback
4011597µs6.76msOpenBSD::PackageLocation::::url OpenBSD::PackageLocation::url
4011448µs1.08sOpenBSD::PackageLocation::::close_now OpenBSD::PackageLocation::close_now
4011281µs539µsOpenBSD::PackageLocation::::new OpenBSD::PackageLocation::new
3911170µs170µsOpenBSD::PackageLocation::::unput OpenBSD::PackageLocation::unput
11134µs43µsOpenBSD::PackageRepository::::BEGIN@18 OpenBSD::PackageRepository::BEGIN@18
11133µs48µsOpenBSD::PackageRepository::::BEGIN@19 OpenBSD::PackageRepository::BEGIN@19
11116µs108µsOpenBSD::PackageLocation::::BEGIN@25 OpenBSD::PackageLocation::BEGIN@25
11116µs192µsOpenBSD::PackageLocation::::BEGIN@23 OpenBSD::PackageLocation::BEGIN@23
0000s0sOpenBSD::PackageLocation::Installed::::infoOpenBSD::PackageLocation::Installed::info
0000s0sOpenBSD::PackageLocation::Installed::::plistOpenBSD::PackageLocation::Installed::plist
0000s0sOpenBSD::PackageLocation::::__ANON__[:54] OpenBSD::PackageLocation::__ANON__[:54]
0000s0sOpenBSD::PackageLocation::::__ANON__[:67] OpenBSD::PackageLocation::__ANON__[:67]
0000s0sOpenBSD::PackageLocation::::__ANON__[:68] OpenBSD::PackageLocation::__ANON__[:68]
0000s0sOpenBSD::PackageLocation::::close OpenBSD::PackageLocation::close
0000s0sOpenBSD::PackageLocation::::close_after_error OpenBSD::PackageLocation::close_after_error
0000s0sOpenBSD::PackageLocation::::close_with_client_error OpenBSD::PackageLocation::close_with_client_error
0000s0sOpenBSD::PackageLocation::::finish_and_close OpenBSD::PackageLocation::finish_and_close
0000s0sOpenBSD::PackageLocation::::forget OpenBSD::PackageLocation::forget
0000s0sOpenBSD::PackageLocation::::grabPlist OpenBSD::PackageLocation::grabPlist
0000s0sOpenBSD::PackageLocation::::plist OpenBSD::PackageLocation::plist
0000s0sOpenBSD::PackageLocation::::set_callback OpenBSD::PackageLocation::set_callback
0000s0sOpenBSD::PackageLocation::::skip OpenBSD::PackageLocation::skip
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# ex:ts=8 sw=4:
2# $OpenBSD: PackageLocation.pm,v 1.51 2017/03/07 14:15:09 espie Exp $
3#
4# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
5#
6# Permission to use, copy, modify, and distribute this software for any
7# purpose with or without fee is hereby granted, provided that the above
8# copyright notice and this permission notice appear in all copies.
9#
10# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
18252µs251µs
# spent 43µs (34+9) within OpenBSD::PackageRepository::BEGIN@18 which was called: # once (34µs+9µs) by OpenBSD::PackageRepository::BEGIN@30 at line 18
use strict;
# spent 43µs making 1 call to OpenBSD::PackageRepository::BEGIN@18 # spent 9µs making 1 call to strict::import
19260µs263µs
# spent 48µs (33+15) within OpenBSD::PackageRepository::BEGIN@19 which was called: # once (33µs+15µs) by OpenBSD::PackageRepository::BEGIN@30 at line 19
use warnings;
# spent 48µs making 1 call to OpenBSD::PackageRepository::BEGIN@19 # spent 15µs making 1 call to warnings::import
20
21package OpenBSD::PackageLocation;
22
23272µs2368µs
# spent 192µs (16+176) within OpenBSD::PackageLocation::BEGIN@23 which was called: # once (16µs+176µs) by OpenBSD::PackageRepository::BEGIN@30 at line 23
use OpenBSD::PackageInfo;
# spent 192µs making 1 call to OpenBSD::PackageLocation::BEGIN@23 # spent 176µs making 1 call to Exporter::import
242330µs127.9ms
# spent 27.9ms (26.7+1.21) within OpenBSD::PackageLocation::BEGIN@24 which was called: # once (26.7ms+1.21ms) by OpenBSD::PackageRepository::BEGIN@30 at line 24
use OpenBSD::Temp;
# spent 27.9ms making 1 call to OpenBSD::PackageLocation::BEGIN@24
2521.65ms2201µs
# spent 108µs (16+92) within OpenBSD::PackageLocation::BEGIN@25 which was called: # once (16µs+92µs) by OpenBSD::PackageRepository::BEGIN@30 at line 25
use OpenBSD::Error;
# spent 108µs making 1 call to OpenBSD::PackageLocation::BEGIN@25 # spent 92µs making 1 call to Exporter::import
26
27sub new
28
# spent 539µs (281+258) within OpenBSD::PackageLocation::new which was called 40 times, avg 13µs/call: # 40 times (281µs+258µs) by OpenBSD::PackageRepositoryBase::new_location at line 163 of OpenBSD/PackageRepository/Installed.pm, avg 13µs/call
{
294029µs my ($class, $repository, $name) = @_;
30
3140121µs40258µs my $self = { repository => $repository, name => $repository->canonicalize($name) };
# spent 258µs making 40 calls to OpenBSD::PackageRepositoryBase::canonicalize, avg 6µs/call
324029µs bless $self, $class;
334098µs return $self;
34
35}
36
37sub url
38
# spent 6.76ms (597µs+6.17) within OpenBSD::PackageLocation::url which was called 40 times, avg 169µs/call: # 40 times (597µs+6.17ms) by OpenBSD::PackageRepository::parse_problems at line 288 of OpenBSD/PackageRepository.pm, avg 169µs/call
{
394046µs my $self = shift;
40
4140431µs806.17ms return $self->{repository}->url($self->name);
# spent 5.99ms making 40 calls to OpenBSD::PackageRepositoryBase::url, avg 150µs/call # spent 180µs making 40 calls to OpenBSD::PackageLocation::name, avg 5µs/call
42}
43
44sub name
45
# spent 1.12ms within OpenBSD::PackageLocation::name which was called 416 times, avg 3µs/call: # 336 times (715µs+0s) by OpenBSD::PkgInfo::CORE:sort at line 605 of OpenBSD/PkgInfo.pm, avg 2µs/call # 40 times (227µs+0s) by OpenBSD::PkgInfo::parse_and_run at line 606 of OpenBSD/PkgInfo.pm, avg 6µs/call # 40 times (180µs+0s) by OpenBSD::PackageLocation::url at line 41, avg 5µs/call
{
46416287µs my $self = shift;
474161.26ms return $self->{name};
48}
49
50OpenBSD::Auto::cache(pkgname,
51 sub {
52 my $self = shift;
53 return OpenBSD::PackageName->from_string($self->name);
5419µs115µs });
# spent 15µs making 1 call to OpenBSD::Auto::cache
55
56OpenBSD::Auto::cache(update_info,
57 sub {
58 my $self = shift;
59 if ($self->name =~ /^quirks\-/) {
60 return $self->plist;
61 }
62 return $self->plist(\&OpenBSD::PackingList::UpdateInfoOnly,
63 sub {
64 return 0 if $_[0] =~ m/^\@option\s+always-update\b/m;
65 return 1 if $_[0] =~ m/^\@(?:newgroup|newuser|cwd)\b/m;
66 return 0;
67 });
6814µs17µs });
# spent 7µs making 1 call to OpenBSD::Auto::cache
69
70
71# make sure self is opened and move to the right location if need be.
72sub _opened
73
# spent 11.7s (8.55ms+11.7) within OpenBSD::PackageLocation::_opened which was called 160 times, avg 73.0ms/call: # 120 times (688µs+0s) by OpenBSD::PackageLocation::next at line 293, avg 6µs/call # 40 times (7.87ms+11.7s) by OpenBSD::PackageLocation::contents at line 133, avg 292ms/call
{
74160142µs my $self = shift;
75
76160984µs if (defined $self->{fh}) {
77 return $self;
78 }
7940350µs4011.7s my $fh = $self->{repository}->open($self);
# spent 11.7s making 40 calls to OpenBSD::PackageRepository::open, avg 292ms/call
804038µs if (!defined $fh) {
81 $self->{repository}->parse_problems($self->{errors}, undef,
82 $self) if defined $self->{errors};
83 undef $self->{errors};
84 return;
85 }
8640300µs require OpenBSD::Ustar;
87401.02ms401.51ms my $archive = OpenBSD::Ustar->new($fh, $self->{repository}{state});
# spent 1.51ms making 40 calls to OpenBSD::Ustar::new, avg 38µs/call
88401.48ms805.53ms $archive->set_description($self->{repository}->url($self->{name}));
# spent 4.23ms making 40 calls to OpenBSD::PackageRepositoryBase::url, avg 106µs/call # spent 1.30ms making 40 calls to OpenBSD::Ustar::set_description, avg 33µs/call
894077µs $self->{_archive} = $archive;
9040830µs40836µs $self->_set_callback;
# spent 836µs making 40 calls to OpenBSD::PackageLocation::_set_callback, avg 21µs/call
91
924051µs if (defined $self->{_current_name}) {
93 while (my $e = $self->{_archive}->next) {
94 if ($e->{name} eq $self->{_current_name}) {
95 $self->{_current} = $e;
96 return $self;
97 }
98 }
99 }
10040446µs return $self;
101}
102
103sub _set_callback
104
# spent 836µs within OpenBSD::PackageLocation::_set_callback which was called 40 times, avg 21µs/call: # 40 times (836µs+0s) by OpenBSD::PackageLocation::_opened at line 90, avg 21µs/call
{
1054045µs my $self = shift;
10640466µs if (defined $self->{callback} && defined $self->{_archive}) {
107 $self->{_archive}->set_callback($self->{callback});
108 }
109}
110
111sub find_contents
112
# spent 121ms (1.88+119) within OpenBSD::PackageLocation::find_contents which was called 40 times, avg 3.01ms/call: # 40 times (1.88ms+119ms) by OpenBSD::PackageLocation::contents at line 143, avg 3.01ms/call
{
1134048µs my ($self, $extra) = @_;
114
11540616µs4020.6ms while (my $e = $self->next) {
# spent 20.6ms making 40 calls to OpenBSD::PackageLocation::next, avg 514µs/call
1164010.1ms8019.5ms if ($e->isFile && is_info_name($e->{name})) {
# spent 19.5ms making 40 calls to OpenBSD::PackageInfo::is_info_name, avg 486µs/call # spent 48µs making 40 calls to OpenBSD::Ustar::File::isFile, avg 1µs/call
1174086µs if ($e->{name} eq CONTENTS ) {
118 my $v =
119401.46ms4078.6ms $self->{extra_content}.$e->contents($extra);
# spent 78.6ms making 40 calls to OpenBSD::Ustar::File::contents, avg 1.97ms/call
12040225µs return $v;
121 }
122 } else {
123 $self->unput;
124 last;
125 }
126 }
127}
128
129sub contents
130
# spent 11.8s (1.32ms+11.8) within OpenBSD::PackageLocation::contents which was called 80 times, avg 148ms/call: # 40 times (1.08ms+11.8s) by OpenBSD::PackageLocation::grab_info at line 154, avg 295ms/call # 40 times (242µs+0s) by OpenBSD::PackageLocation::grab_info at line 161, avg 6µs/call
{
13180109µs my ($self, $extra) = @_;
13280139µs if (!defined $self->{contents}) {
13340165µs4011.7s if (!$self->_opened) {
# spent 11.7s making 40 calls to OpenBSD::PackageLocation::_opened, avg 292ms/call
134 return;
135 }
1364042µs if (defined $extra) {
137 my $contents = $self->find_contents($extra);
138 if ($contents) {
139 $self->unput;
140 }
141 return $contents;
142 }
14340216µs40121ms $self->{contents} = $self->find_contents;
# spent 121ms making 40 calls to OpenBSD::PackageLocation::find_contents, avg 3.01ms/call
144 }
145
14680515µs return $self->{contents};
147}
148
149sub grab_info
150
# spent 11.9s (9.47ms+11.9) within OpenBSD::PackageLocation::grab_info which was called 40 times, avg 299ms/call: # 40 times (9.47ms+11.9s) by OpenBSD::PackageLocation::info at line 222, avg 299ms/call
{
1514040µs my $self = shift;
15240325µs4038.1ms my $dir = $self->{dir} = OpenBSD::Temp->dir;
# spent 38.1ms making 40 calls to OpenBSD::Temp::dir, avg 951µs/call
153
15440187µs4011.8s my $c = $self->contents;
# spent 11.8s making 40 calls to OpenBSD::PackageLocation::contents, avg 295ms/call
1554042µs if (!defined $c) {
156 return 0;
157 }
158
159401.61ms401.11ms if (! -f $dir.CONTENTS) {
# spent 1.11ms making 40 calls to OpenBSD::PackageLocation::CORE:ftfile, avg 28µs/call
160403.07ms401.73ms open my $fh, '>', $dir.CONTENTS or die "Permission denied";
# spent 1.73ms making 40 calls to OpenBSD::PackageLocation::CORE:open, avg 43µs/call
161402.78ms802.69ms print $fh $self->contents;
# spent 2.45ms making 40 calls to OpenBSD::PackageLocation::CORE:print, avg 61µs/call # spent 242µs making 40 calls to OpenBSD::PackageLocation::contents, avg 6µs/call
162401.74ms401.07ms close $fh;
# spent 1.07ms making 40 calls to OpenBSD::PackageLocation::CORE:close, avg 27µs/call
163 }
164
16540805µs8063.8ms while (my $e = $self->next) {
# spent 63.8ms making 80 calls to OpenBSD::PackageLocation::next, avg 797µs/call
16679782µs158602µs if ($e->isFile && is_info_name($e->{name})) {
# spent 375µs making 79 calls to OpenBSD::PackageInfo::is_info_name, avg 5µs/call # spent 228µs making 79 calls to OpenBSD::Ustar::File::isFile, avg 3µs/call
16740140µs $e->{name} = $dir.$e->{name};
1684051µs undef $e->{mtime};
1694038µs undef $e->{atime};
170803.50ms4021.4ms eval { $e->create; };
# spent 21.4ms making 40 calls to OpenBSD::Ustar::File::create, avg 534µs/call
1714043µs if ($@) {
172 unlink($e->{name});
173 $@ =~ s/\s+at.*//o;
174 $self->{repository}{state}->errprint('#1', $@);
175 return 0;
176 }
177 } else {
17839137µs39170µs $self->unput;
# spent 170µs making 39 calls to OpenBSD::PackageLocation::unput, avg 4µs/call
1793965µs last;
180 }
181 }
1824022.9ms return 1;
183}
184
185sub grabPlist
186{
187 my ($self, $code) = @_;
188
189 my $plist = $self->plist($code);
190 if (defined $plist) {
191 $self->wipe_info;
192 $self->close_now;
193 return $plist;
194 } else {
195 return;
196 }
197}
198
199sub forget
200{
201 my $self = shift;
202 $self->wipe_info;
203 $self->close_now;
204}
205
206sub wipe_info
207
# spent 54.9ms (1.33+53.6) within OpenBSD::PackageLocation::wipe_info which was called 40 times, avg 1.37ms/call: # 40 times (1.33ms+53.6ms) by OpenBSD::PkgInfo::parse_and_run at line 608 of OpenBSD/PkgInfo.pm, avg 1.37ms/call
{
2084044µs my $self = shift;
20940364µs4052.4ms $self->{repository}->wipe_info($self);
# spent 52.4ms making 40 calls to OpenBSD::PackageRepository::wipe_info, avg 1.31ms/call
21040206µs401.05ms $self->{repository}->close_now($self);
# spent 1.05ms making 40 calls to OpenBSD::PackageRepositoryBase::close_now, avg 26µs/call
21140352µs delete $self->{contents};
21240122µs40195µs $self->deref;
# spent 195µs making 40 calls to OpenBSD::PackageLocation::deref, avg 5µs/call
2134058µs delete $self->{_current_name};
2144047µs delete $self->{update_info};
21540183µs delete $self->{_unput};
216}
217
218sub info
219
# spent 12.0s (23.1ms+11.9) within OpenBSD::PackageLocation::info which was called 40 times, avg 299ms/call: # 40 times (23.1ms+11.9s) by OpenBSD::PkgInfo::print_info at line 416 of OpenBSD/PkgInfo.pm, avg 299ms/call
{
2204042µs my $self = shift;
221
22240194µs4011.9s if (!defined $self->{dir}) {
# spent 11.9s making 40 calls to OpenBSD::PackageLocation::grab_info, avg 299ms/call
223 $self->grab_info;
224 }
22540316µs return $self->{dir};
226}
227
228sub plist
229{
230 my ($self, $code, $extra) = @_;
231 require OpenBSD::PackingList;
232
233 if (defined $self->{dir} && -f $self->{dir}.CONTENTS) {
234 my $plist =
235 OpenBSD::PackingList->fromfile($self->{dir}.CONTENTS,
236 $code);
237 $plist->set_infodir($self->{dir});
238 return $plist;
239 }
240 if (my $value = $self->contents($extra)) {
241 return OpenBSD::PackingList->fromfile(\$value, $code);
242 }
243 # hopeless
244 $self->close_with_client_error;
245
246 return;
247}
248
249sub close
250{
251 my ($self, $hint) = @_;
252 $self->{repository}->close($self, $hint);
253}
254
255sub finish_and_close
256{
257 my $self = shift;
258 $self->{repository}->finish_and_close($self);
259}
260
261sub close_now
262
# spent 1.08s (448µs+1.08) within OpenBSD::PackageLocation::close_now which was called 40 times, avg 27.0ms/call: # 40 times (448µs+1.08s) by OpenBSD::PkgInfo::parse_and_run at line 607 of OpenBSD/PkgInfo.pm, avg 27.0ms/call
{
2634044µs my $self = shift;
26440735µs401.08s $self->{repository}->close_now($self);
# spent 1.08s making 40 calls to OpenBSD::PackageRepositoryBase::close_now, avg 27.0ms/call
265}
266
267sub close_after_error
268{
269 my $self = shift;
270 $self->{repository}->close_after_error($self);
271}
272
273sub close_with_client_error
274{
275 my $self = shift;
276 $self->{repository}->close_with_client_error($self);
277}
278
279sub deref
280
# spent 6.53ms (3.76+2.77) within OpenBSD::PackageLocation::deref which was called 120 times, avg 54µs/call: # 80 times (3.57ms+2.77ms) by OpenBSD::PackageRepository::close at line 220 of OpenBSD/PackageRepository.pm, avg 79µs/call # 40 times (195µs+0s) by OpenBSD::PackageLocation::wipe_info at line 212, avg 5µs/call
{
281120122µs my $self = shift;
282120127µs delete $self->{fh};
283120125µs delete $self->{pid2};
284120157µs247µs delete $self->{_archive};
# spent 43µs making 1 call to IO::Uncompress::Base::DESTROY # spent 4µs making 1 call to Compress::Raw::Zlib::inflateStream::DESTROY
2851204.16ms782.72ms delete $self->{_current};
# spent 1.93ms making 39 calls to IO::Uncompress::Base::DESTROY, avg 49µs/call # spent 795µs making 39 calls to Compress::Raw::Zlib::inflateStream::DESTROY, avg 20µs/call
286}
287
288# proxy for archive operations
289sub next
290
# spent 84.3ms (3.22+81.1) within OpenBSD::PackageLocation::next which was called 120 times, avg 703µs/call: # 80 times (1.57ms+62.2ms) by OpenBSD::PackageLocation::grab_info at line 165, avg 797µs/call # 40 times (1.65ms+18.9ms) by OpenBSD::PackageLocation::find_contents at line 115, avg 514µs/call
{
291120117µs my $self = shift;
292
293120659µs120688µs if (!$self->_opened) {
# spent 688µs making 120 calls to OpenBSD::PackageLocation::_opened, avg 6µs/call
294 return;
295 }
296120232µs if (!$self->{_unput}) {
297120729µs12080.4ms $self->{_current} = $self->getNext;
# spent 80.4ms making 120 calls to OpenBSD::PackageLocation::getNext, avg 670µs/call
298120244µs if (defined $self->{_current}) {
299 $self->{_current_name} = $self->{_current}{name};
300 } else {
30111µs delete $self->{_current_name};
302 }
303 } else {
304 $self->{_unput} = 0;
305 }
306120465µs return $self->{_current};
307}
308
309sub unput
310
# spent 170µs within OpenBSD::PackageLocation::unput which was called 39 times, avg 4µs/call: # 39 times (170µs+0s) by OpenBSD::PackageLocation::grab_info at line 178, avg 4µs/call
{
3113939µs my $self = shift;
31239190µs $self->{_unput} = 1;
313}
314
315sub getNext
316
# spent 80.4ms (985µs+79.4) within OpenBSD::PackageLocation::getNext which was called 120 times, avg 670µs/call: # 120 times (985µs+79.4ms) by OpenBSD::PackageLocation::next at line 297, avg 670µs/call
{
317120106µs my $self = shift;
318
3191201.37ms12079.4ms return $self->{_archive}->next;
# spent 79.4ms making 120 calls to OpenBSD::Ustar::next, avg 662µs/call
320}
321
322sub skip
323{
324 my $self = shift;
325 return $self->{_archive}->skip;
326}
327
328sub set_callback
329{
330 my ($self, $code) = @_;
331 $self->{callback} = $code;
332 $self->_set_callback;
333}
334
335package OpenBSD::PackageLocation::Installed;
33618µsour @ISA = qw(OpenBSD::PackageLocation);
337
338
339sub info
340{
341 my $self = shift;
342 require OpenBSD::PackageInfo;
343 $self->{dir} = OpenBSD::PackageInfo::installed_info($self->name);
344}
345
346sub plist
347{
348 my ($self, $code) = @_;
349 require OpenBSD::PackingList;
350 return OpenBSD::PackingList->from_installation($self->name, $code);
351}
352
35316µs1;
 
# spent 1.07ms within OpenBSD::PackageLocation::CORE:close which was called 40 times, avg 27µs/call: # 40 times (1.07ms+0s) by OpenBSD::PackageLocation::grab_info at line 162, avg 27µs/call
sub OpenBSD::PackageLocation::CORE:close; # opcode
# spent 1.11ms within OpenBSD::PackageLocation::CORE:ftfile which was called 40 times, avg 28µs/call: # 40 times (1.11ms+0s) by OpenBSD::PackageLocation::grab_info at line 159, avg 28µs/call
sub OpenBSD::PackageLocation::CORE:ftfile; # opcode
# spent 1.73ms within OpenBSD::PackageLocation::CORE:open which was called 40 times, avg 43µs/call: # 40 times (1.73ms+0s) by OpenBSD::PackageLocation::grab_info at line 160, avg 43µs/call
sub OpenBSD::PackageLocation::CORE:open; # opcode
# spent 2.45ms within OpenBSD::PackageLocation::CORE:print which was called 40 times, avg 61µs/call: # 40 times (2.45ms+0s) by OpenBSD::PackageLocation::grab_info at line 161, avg 61µs/call
sub OpenBSD::PackageLocation::CORE:print; # opcode