| Filename | /usr/local/perls/perl-5.26.1/lib/5.26.1/version.pm |
| Statements | Executed 0 statements in 0s |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 45 | 45 | 17 | 529µs | 529µs | version::_VERSION (xsub) |
| 0 | 0 | 0 | 0s | 0s | version::BEGIN |
| 0 | 0 | 0 | 0s | 0s | version::__ANON__[:50] |
| 0 | 0 | 0 | 0s | 0s | version::__ANON__[:56] |
| 0 | 0 | 0 | 0s | 0s | version::import |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | #!perl -w | ||||
| 2 | package version; | ||||
| 3 | |||||
| 4 | use 5.006002; | ||||
| 5 | use strict; | ||||
| 6 | use warnings::register; | ||||
| 7 | if ($] >= 5.015) { | ||||
| 8 | warnings::register_categories(qw/version/); | ||||
| 9 | } | ||||
| 10 | |||||
| 11 | use vars qw(@ISA $VERSION $CLASS $STRICT $LAX *declare *qv); | ||||
| 12 | |||||
| 13 | $VERSION = 0.9917; | ||||
| 14 | $CLASS = 'version'; | ||||
| 15 | |||||
| 16 | # avoid using Exporter | ||||
| 17 | require version::regex; | ||||
| 18 | *version::is_lax = \&version::regex::is_lax; | ||||
| 19 | *version::is_strict = \&version::regex::is_strict; | ||||
| 20 | *LAX = \$version::regex::LAX; | ||||
| 21 | *STRICT = \$version::regex::STRICT; | ||||
| 22 | |||||
| 23 | sub import { | ||||
| 24 | no strict 'refs'; | ||||
| 25 | my ($class) = shift; | ||||
| 26 | |||||
| 27 | # Set up any derived class | ||||
| 28 | unless ($class eq $CLASS) { | ||||
| 29 | local $^W; | ||||
| 30 | *{$class.'::declare'} = \&{$CLASS.'::declare'}; | ||||
| 31 | *{$class.'::qv'} = \&{$CLASS.'::qv'}; | ||||
| 32 | } | ||||
| 33 | |||||
| 34 | my %args; | ||||
| 35 | if (@_) { # any remaining terms are arguments | ||||
| 36 | map { $args{$_} = 1 } @_ | ||||
| 37 | } | ||||
| 38 | else { # no parameters at all on use line | ||||
| 39 | %args = | ||||
| 40 | ( | ||||
| 41 | qv => 1, | ||||
| 42 | 'UNIVERSAL::VERSION' => 1, | ||||
| 43 | ); | ||||
| 44 | } | ||||
| 45 | |||||
| 46 | my $callpkg = caller(); | ||||
| 47 | |||||
| 48 | if (exists($args{declare})) { | ||||
| 49 | *{$callpkg.'::declare'} = | ||||
| 50 | sub {return $class->declare(shift) } | ||||
| 51 | unless defined(&{$callpkg.'::declare'}); | ||||
| 52 | } | ||||
| 53 | |||||
| 54 | if (exists($args{qv})) { | ||||
| 55 | *{$callpkg.'::qv'} = | ||||
| 56 | sub {return $class->qv(shift) } | ||||
| 57 | unless defined(&{$callpkg.'::qv'}); | ||||
| 58 | } | ||||
| 59 | |||||
| 60 | if (exists($args{'UNIVERSAL::VERSION'})) { | ||||
| 61 | local $^W; | ||||
| 62 | *UNIVERSAL::VERSION | ||||
| 63 | = \&{$CLASS.'::_VERSION'}; | ||||
| 64 | } | ||||
| 65 | |||||
| 66 | if (exists($args{'VERSION'})) { | ||||
| 67 | *{$callpkg.'::VERSION'} = \&{$CLASS.'::_VERSION'}; | ||||
| 68 | } | ||||
| 69 | |||||
| 70 | if (exists($args{'is_strict'})) { | ||||
| 71 | *{$callpkg.'::is_strict'} = \&{$CLASS.'::is_strict'} | ||||
| 72 | unless defined(&{$callpkg.'::is_strict'}); | ||||
| 73 | } | ||||
| 74 | |||||
| 75 | if (exists($args{'is_lax'})) { | ||||
| 76 | *{$callpkg.'::is_lax'} = \&{$CLASS.'::is_lax'} | ||||
| 77 | unless defined(&{$callpkg.'::is_lax'}); | ||||
| 78 | } | ||||
| 79 | } | ||||
| 80 | |||||
| 81 | |||||
| 82 | 1; | ||||
# spent 529µs within version::_VERSION which was called 45 times, avg 12µs/call:
# once (20µs+0s) by URI::Escape::BEGIN@140 at line 140 of URI/Escape.pm
# once (20µs+0s) by IO::Uncompress::Adapter::Bunzip2::BEGIN@9 at line 9 of IO/Uncompress/Adapter/Bunzip2.pm
# once (19µs+0s) by IO::Compress::Bzip2::BEGIN@8 at line 8 of IO/Compress/Bzip2.pm
# once (17µs+0s) by IO::Compress::Gzip::BEGIN@11 at line 11 of IO/Compress/Gzip.pm
# once (16µs+0s) by IO::Uncompress::Bunzip2::BEGIN@7 at line 7 of IO/Uncompress/Bunzip2.pm
# once (16µs+0s) by IO::Compress::Gzip::BEGIN@12 at line 12 of IO/Compress/Gzip.pm
# once (15µs+0s) by URI::URL::BEGIN@13 at line 13 of URI/URL.pm
# once (15µs+0s) by Compress::Zlib::BEGIN@10 at line 10 of Compress/Zlib.pm
# once (14µs+0s) by IO::Compress::RawDeflate::BEGIN@11 at line 11 of IO/Compress/RawDeflate.pm
# once (14µs+0s) by IO::Uncompress::RawInflate::BEGIN@11 at line 11 of IO/Uncompress/RawInflate.pm
# once (14µs+0s) by Compress::Zlib::BEGIN@11 at line 11 of Compress/Zlib.pm
# once (13µs+0s) by IO::Uncompress::Adapter::Inflate::BEGIN@7 at line 7 of IO/Uncompress/Adapter/Inflate.pm
# once (12µs+0s) by IO::Uncompress::Bunzip2::BEGIN@10 at line 10 of IO/Uncompress/Bunzip2.pm
# once (12µs+0s) by IO::Uncompress::RawInflate::BEGIN@8 at line 8 of IO/Uncompress/RawInflate.pm
# once (12µs+0s) by IO::Compress::Gzip::BEGIN@15 at line 15 of IO/Compress/Gzip.pm
# once (12µs+0s) by IO::Compress::Base::BEGIN@9 at line 9 of IO/Compress/Base.pm
# once (12µs+0s) by IO::Uncompress::Adapter::Bunzip2::BEGIN@7 at line 7 of IO/Uncompress/Adapter/Bunzip2.pm
# once (12µs+0s) by Compress::Zlib::BEGIN@464 at line 464 of Compress/Zlib.pm
# once (12µs+0s) by IO::Compress::Adapter::Bzip2::BEGIN@7 at line 7 of IO/Compress/Adapter/Bzip2.pm
# once (12µs+0s) by CPAN::__ANON__[/usr/local/perls/perl-5.26.1/lib/5.26.1/CPAN.pm:1113] at line 1104 of CPAN.pm
# once (11µs+0s) by IO::Uncompress::Gunzip::BEGIN@12 at line 12 of IO/Uncompress/Gunzip.pm
# once (11µs+0s) by IO::Compress::Zlib::Extra::BEGIN@13 at line 13 of IO/Compress/Zlib/Extra.pm
# once (11µs+0s) by IO::Uncompress::RawInflate::BEGIN@12 at line 12 of IO/Uncompress/RawInflate.pm
# once (11µs+0s) by IO::Uncompress::Adapter::Inflate::BEGIN@8 at line 8 of IO/Uncompress/Adapter/Inflate.pm
# once (10µs+0s) by IO::Compress::RawDeflate::BEGIN@119 at line 119 of IO/Compress/RawDeflate.pm
# once (10µs+0s) by IO::Compress::RawDeflate::BEGIN@120 at line 120 of IO/Compress/RawDeflate.pm
# once (10µs+0s) by IO::Uncompress::Bunzip2::BEGIN@9 at line 9 of IO/Uncompress/Bunzip2.pm
# once (10µs+0s) by IO::Compress::Adapter::Deflate::BEGIN@7 at line 7 of IO/Compress/Adapter/Deflate.pm
# once (10µs+0s) by IO::Compress::Adapter::Deflate::BEGIN@8 at line 8 of IO/Compress/Adapter/Deflate.pm
# once (10µs+0s) by IO::Compress::Bzip2::BEGIN@11 at line 11 of IO/Compress/Bzip2.pm
# once (10µs+0s) by IO::Uncompress::Base::BEGIN@17 at line 17 of IO/Uncompress/Base.pm
# once (10µs+0s) by Compress::Zlib::BEGIN@13 at line 13 of Compress/Zlib.pm
# once (10µs+0s) by Compress::Zlib::BEGIN@12 at line 12 of Compress/Zlib.pm
# once (9µs+0s) by IO::Compress::RawDeflate::BEGIN@10 at line 10 of IO/Compress/RawDeflate.pm
# once (9µs+0s) by IO::Compress::RawDeflate::BEGIN@9 at line 9 of IO/Compress/RawDeflate.pm
# once (9µs+0s) by IO::Uncompress::Gunzip::BEGIN@14 at line 14 of IO/Uncompress/Gunzip.pm
# once (9µs+0s) by IO::Uncompress::Gunzip::BEGIN@17 at line 17 of IO/Uncompress/Gunzip.pm
# once (9µs+0s) by IO::Uncompress::Gunzip::BEGIN@16 at line 16 of IO/Uncompress/Gunzip.pm
# once (9µs+0s) by IO::Uncompress::RawInflate::BEGIN@9 at line 9 of IO/Uncompress/RawInflate.pm
# once (9µs+0s) by IO::Compress::Gzip::BEGIN@14 at line 14 of IO/Compress/Gzip.pm
# once (9µs+0s) by IO::Compress::Bzip2::BEGIN@10 at line 10 of IO/Compress/Bzip2.pm
# once (9µs+0s) by IO::Compress::Bzip2::BEGIN@54 at line 54 of IO/Compress/Bzip2.pm
# once (9µs+0s) by IO::Compress::Adapter::Bzip2::BEGIN@9 at line 9 of IO/Compress/Adapter/Bzip2.pm
# once (8µs+0s) by IO::Uncompress::Gunzip::BEGIN@15 at line 15 of IO/Uncompress/Gunzip.pm
# once (8µs+0s) by IO::Compress::Gzip::BEGIN@16 at line 16 of IO/Compress/Gzip.pm |