← Index
NYTProf Performance Profile   « line view »
For script/ponapi
  Run on Wed Feb 10 15:51:26 2016
Reported on Thu Feb 11 09:43:09 2016

Filename/usr/share/perl/5.18/Perl/OSType.pm
StatementsExecuted 11 statements in 238µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1118µs20µsPath::Class::File::::BEGIN@1.10Path::Class::File::BEGIN@1.10
1117µs13µsPath::Class::File::::BEGIN@2Path::Class::File::BEGIN@2
0000s0sPerl::OSType::::is_os_type Perl::OSType::is_os_type
0000s0sPerl::OSType::::os_type Perl::OSType::os_type
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1219µs231µs
# spent 20µs (8+11) within Path::Class::File::BEGIN@1.10 which was called: # once (8µs+11µs) by Path::Class::File::BEGIN@13 at line 1
use strict;
# spent 20µs making 1 call to Path::Class::File::BEGIN@1.10 # spent 11µs making 1 call to strict::import
22186µs219µs
# spent 13µs (7+6) within Path::Class::File::BEGIN@2 which was called: # once (7µs+6µs) by Path::Class::File::BEGIN@13 at line 2
use warnings;
# spent 13µs making 1 call to Path::Class::File::BEGIN@2 # spent 6µs making 1 call to warnings::import
3package Perl::OSType;
4# ABSTRACT: Map Perl operating system names to generic types
51400nsour $VERSION = '1.003'; # VERSION
6
71500nsrequire Exporter;
814µsour @ISA = qw(Exporter);
9
1012µsour %EXPORT_TAGS = (
11 all => [ qw( os_type is_os_type ) ]
12);
13
141900nsour @EXPORT_OK = @{ $EXPORT_TAGS{all} };
15
16# originally taken from Module::Build by Ken Williams et al.
17116µsmy %OSTYPES = qw(
18 aix Unix
19 bsdos Unix
20 beos Unix
21 dgux Unix
22 dragonfly Unix
23 dynixptx Unix
24 freebsd Unix
25 linux Unix
26 haiku Unix
27 hpux Unix
28 iphoneos Unix
29 irix Unix
30 darwin Unix
31 machten Unix
32 midnightbsd Unix
33 mirbsd Unix
34 next Unix
35 openbsd Unix
36 netbsd Unix
37 dec_osf Unix
38 nto Unix
39 svr4 Unix
40 svr5 Unix
41 sco_sv Unix
42 unicos Unix
43 unicosmk Unix
44 solaris Unix
45 sunos Unix
46 cygwin Unix
47 os2 Unix
48 interix Unix
49 gnu Unix
50 gnukfreebsd Unix
51 nto Unix
52 qnx Unix
53
54 dos Windows
55 MSWin32 Windows
56
57 os390 EBCDIC
58 os400 EBCDIC
59 posix-bc EBCDIC
60 vmesa EBCDIC
61
62 MacOS MacOS
63 VMS VMS
64 vos VOS
65 riscos RiscOS
66 amigaos Amiga
67 mpeix MPEiX
68);
69
70sub os_type {
71 my ($os) = @_;
72 $os = $^O unless defined $os;
73 return $OSTYPES{ $os } || q{};
74}
75
76sub is_os_type {
77 my ($type, $os) = @_;
78 return unless $type;
79 $os = $^O unless defined $os;
80 return os_type($os) eq $type;
81}
82
8319µs1;
84
85__END__