| Filename | /2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux/YAML/Syck.pm |
| Statements | Executed 44 statements in 2.41ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 2 | 2 | 1 | 463µs | 463µs | YAML::Syck::LoadYAML (xsub) |
| 1 | 1 | 1 | 51µs | 594µs | YAML::Syck::LoadFile |
| 1 | 1 | 1 | 36µs | 89µs | YAML::Syck::BEGIN@36 |
| 1 | 1 | 1 | 32µs | 32µs | YAML::Syck::CORE:open (opcode) |
| 2 | 2 | 2 | 24µs | 486µs | YAML::Syck::Load |
| 1 | 1 | 1 | 22µs | 259µs | YAML::Syck::BEGIN@15 |
| 1 | 1 | 1 | 14µs | 14µs | YAML::Syck::BEGIN@12 |
| 1 | 1 | 1 | 14µs | 14µs | YAML::Syck::CORE:ftis (opcode) |
| 1 | 1 | 1 | 12µs | 12µs | YAML::Syck::CORE:readline (opcode) |
| 1 | 1 | 1 | 11µs | 13µs | YAML::Syck::BEGIN@4 |
| 1 | 1 | 1 | 10µs | 12µs | YAML::Syck::_is_glob |
| 1 | 1 | 1 | 7µs | 20µs | YAML::Syck::BEGIN@13 |
| 1 | 1 | 1 | 7µs | 149µs | YAML::Syck::BEGIN@5 |
| 1 | 1 | 1 | 2µs | 2µs | YAML::Syck::CORE:ftzero (opcode) |
| 1 | 1 | 1 | 1µs | 1µs | YAML::Syck::CORE:match (opcode) |
| 0 | 0 | 0 | 0s | 0s | YAML::Syck::Dump |
| 0 | 0 | 0 | 0s | 0s | YAML::Syck::DumpFile |
| 0 | 0 | 0 | 0s | 0s | YAML::Syck::__ANON__[:37] |
| 0 | 0 | 0 | 0s | 0s | YAML::Syck::__ANON__[:38] |
| 0 | 0 | 0 | 0s | 0s | YAML::Syck::__ANON__[:39] |
| 0 | 0 | 0 | 0s | 0s | YAML::Syck::__ANON__[:40] |
| 0 | 0 | 0 | 0s | 0s | YAML::Syck::__ANON__[:41] |
| 0 | 0 | 0 | 0s | 0s | YAML::Syck::__ANON__[:42] |
| 0 | 0 | 0 | 0s | 0s | YAML::Syck::__ANON__[:43] |
| 0 | 0 | 0 | 0s | 0s | YAML::Syck::__ANON__[:44] |
| 0 | 0 | 0 | 0s | 0s | YAML::Syck::__ANON__[:45] |
| 0 | 0 | 0 | 0s | 0s | YAML::Syck::__ANON__[:46] |
| 0 | 0 | 0 | 0s | 0s | YAML::Syck::__ANON__[:47] |
| 0 | 0 | 0 | 0s | 0s | YAML::Syck::__ANON__[:48] |
| 0 | 0 | 0 | 0s | 0s | YAML::Syck::__ANON__[:49] |
| 0 | 0 | 0 | 0s | 0s | YAML::Syck::__ANON__[:50] |
| 0 | 0 | 0 | 0s | 0s | YAML::Syck::__ANON__[:51] |
| 0 | 0 | 0 | 0s | 0s | YAML::Syck::__ANON__[:52] |
| 0 | 0 | 0 | 0s | 0s | YAML::Syck::__qr_helper |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package YAML::Syck; | ||||
| 2 | # See documentation after the __END__ mark. | ||||
| 3 | |||||
| 4 | 3 | 29µs | 2 | 15µs | # spent 13µs (11+2) within YAML::Syck::BEGIN@4 which was called:
# once (11µs+2µs) by Tapper::Config::BEGIN@15 at line 4 # spent 13µs making 1 call to YAML::Syck::BEGIN@4
# spent 2µs making 1 call to strict::import |
| 5 | 1 | 142µs | # spent 149µs (7+142) within YAML::Syck::BEGIN@5 which was called:
# once (7µs+142µs) by Tapper::Config::BEGIN@15 at line 11 # spent 142µs making 1 call to vars::import | ||
| 6 | @ISA @EXPORT $VERSION | ||||
| 7 | $Headless $SortKeys $SingleQuote | ||||
| 8 | $ImplicitBinary $ImplicitTyping $ImplicitUnicode | ||||
| 9 | $UseCode $LoadCode $DumpCode | ||||
| 10 | $DeparseObject $LoadBlessed | ||||
| 11 | 3 | 19µs | 1 | 149µs | ); # spent 149µs making 1 call to YAML::Syck::BEGIN@5 |
| 12 | 3 | 27µs | 1 | 14µs | # spent 14µs within YAML::Syck::BEGIN@12 which was called:
# once (14µs+0s) by Tapper::Config::BEGIN@15 at line 12 # spent 14µs making 1 call to YAML::Syck::BEGIN@12 |
| 13 | 3 | 81µs | 2 | 33µs | # spent 20µs (7+13) within YAML::Syck::BEGIN@13 which was called:
# once (7µs+13µs) by Tapper::Config::BEGIN@15 at line 13 # spent 20µs making 1 call to YAML::Syck::BEGIN@13
# spent 13µs making 1 call to Exporter::import |
| 14 | |||||
| 15 | # spent 259µs (22+238) within YAML::Syck::BEGIN@15 which was called:
# once (22µs+238µs) by Tapper::Config::BEGIN@15 at line 34 | ||||
| 16 | 10 | 259µs | $VERSION = '1.20'; | ||
| 17 | @EXPORT = qw( Dump Load DumpFile LoadFile ); | ||||
| 18 | @ISA = qw( Exporter ); | ||||
| 19 | |||||
| 20 | $SortKeys = 1; | ||||
| 21 | $LoadBlessed = 1; | ||||
| 22 | |||||
| 23 | local $@; | ||||
| 24 | eval { | ||||
| 25 | require XSLoader; | ||||
| 26 | 1 | 238µs | XSLoader::load(__PACKAGE__, $VERSION); # spent 238µs making 1 call to XSLoader::load | ||
| 27 | 1; | ||||
| 28 | } or do { | ||||
| 29 | require DynaLoader; | ||||
| 30 | push @ISA, 'DynaLoader'; | ||||
| 31 | __PACKAGE__->bootstrap($VERSION); | ||||
| 32 | }; | ||||
| 33 | |||||
| 34 | 1 | 289µs | 1 | 259µs | } # spent 259µs making 1 call to YAML::Syck::BEGIN@15 |
| 35 | |||||
| 36 | # spent 89µs (36+53) within YAML::Syck::BEGIN@36 which was called:
# once (36µs+53µs) by Tapper::Config::BEGIN@15 at line 53 | ||||
| 37 | '' => sub { qr{$_[0]} }, | ||||
| 38 | x => sub { qr{$_[0]}x }, | ||||
| 39 | i => sub { qr{$_[0]}i }, | ||||
| 40 | s => sub { qr{$_[0]}s }, | ||||
| 41 | m => sub { qr{$_[0]}m }, | ||||
| 42 | ix => sub { qr{$_[0]}ix }, | ||||
| 43 | sx => sub { qr{$_[0]}sx }, | ||||
| 44 | mx => sub { qr{$_[0]}mx }, | ||||
| 45 | si => sub { qr{$_[0]}si }, | ||||
| 46 | mi => sub { qr{$_[0]}mi }, | ||||
| 47 | ms => sub { qr{$_[0]}sm }, | ||||
| 48 | six => sub { qr{$_[0]}six }, | ||||
| 49 | mix => sub { qr{$_[0]}mix }, | ||||
| 50 | msx => sub { qr{$_[0]}msx }, | ||||
| 51 | msi => sub { qr{$_[0]}msi }, | ||||
| 52 | msix => sub { qr{$_[0]}msix }, | ||||
| 53 | 3 | 436µs | 2 | 142µs | }; # spent 89µs making 1 call to YAML::Syck::BEGIN@36
# spent 53µs making 1 call to constant::import |
| 54 | |||||
| 55 | sub __qr_helper { | ||||
| 56 | if ($_[0] =~ /\A \(\? ([ixsm]*) (?:- (?:[ixsm]*))? : (.*) \) \z/x) { | ||||
| 57 | my $sub = QR_MAP()->{$1} || QR_MAP()->{''}; | ||||
| 58 | &$sub($2); | ||||
| 59 | } | ||||
| 60 | else { | ||||
| 61 | qr/$_[0]/; | ||||
| 62 | } | ||||
| 63 | } | ||||
| 64 | |||||
| 65 | sub Dump { | ||||
| 66 | $#_ ? join('', map { YAML::Syck::DumpYAML($_) } @_) | ||||
| 67 | : YAML::Syck::DumpYAML($_[0]); | ||||
| 68 | } | ||||
| 69 | |||||
| 70 | # spent 486µs (24+462) within YAML::Syck::Load which was called 2 times, avg 243µs/call:
# once (10µs+462µs) by YAML::Syck::LoadFile at line 123
# once (15µs+0s) by Tapper::Config::_switch_context at line 72 of Tapper/Config.pm | ||||
| 71 | 6 | 1.14ms | if (wantarray) { | ||
| 72 | 1 | 462µs | my ($rv) = YAML::Syck::LoadYAML($_[0]); # spent 462µs making 1 call to YAML::Syck::LoadYAML | ||
| 73 | @{$rv}; | ||||
| 74 | } | ||||
| 75 | else { | ||||
| 76 | @_ = $_[0]; | ||||
| 77 | 1 | 1µs | goto &YAML::Syck::LoadYAML; # spent 1µs making 1 call to YAML::Syck::LoadYAML | ||
| 78 | } | ||||
| 79 | } | ||||
| 80 | |||||
| 81 | # spent 12µs (10+1) within YAML::Syck::_is_glob which was called:
# once (10µs+1µs) by YAML::Syck::LoadFile at line 115 | ||||
| 82 | 5 | 14µs | my $h = shift; | ||
| 83 | |||||
| 84 | return 1 if(ref($h) eq 'GLOB'); | ||||
| 85 | return 1 if(ref(\$h) eq 'GLOB'); | ||||
| 86 | 1 | 1µs | return 1 if(ref($h) =~ m/^IO::/); # spent 1µs making 1 call to YAML::Syck::CORE:match | ||
| 87 | |||||
| 88 | return; | ||||
| 89 | } | ||||
| 90 | |||||
| 91 | sub DumpFile { | ||||
| 92 | my $file = shift; | ||||
| 93 | if ( _is_glob($file) ) { | ||||
| 94 | if ($#_) { | ||||
| 95 | print {$file} YAML::Syck::DumpYAML($_) for @_; | ||||
| 96 | } | ||||
| 97 | else { | ||||
| 98 | print {$file} YAML::Syck::DumpYAML($_[0]); | ||||
| 99 | } | ||||
| 100 | } | ||||
| 101 | else { | ||||
| 102 | open(my $fh, '>', $file) or die "Cannot write to $file: $!"; | ||||
| 103 | if ($#_) { | ||||
| 104 | print {$fh} YAML::Syck::DumpYAML($_) for @_; | ||||
| 105 | } | ||||
| 106 | else { | ||||
| 107 | print {$fh} YAML::Syck::DumpYAML($_[0]); | ||||
| 108 | } | ||||
| 109 | close $fh; | ||||
| 110 | } | ||||
| 111 | } | ||||
| 112 | |||||
| 113 | # spent 594µs (51+543) within YAML::Syck::LoadFile which was called:
# once (51µs+543µs) by Test::Fixture::DBIC::Schema::_load_fixture at line 36 of Test/Fixture/DBIC/Schema.pm | ||||
| 114 | 7 | 110µs | my $file = shift; | ||
| 115 | 1 | 12µs | if ( _is_glob($file) ) { # spent 12µs making 1 call to YAML::Syck::_is_glob | ||
| 116 | Load(do { local $/; <$file> }); | ||||
| 117 | } | ||||
| 118 | else { | ||||
| 119 | 2 | 16µs | if(!-e $file || -z $file) { # spent 14µs making 1 call to YAML::Syck::CORE:ftis
# spent 2µs making 1 call to YAML::Syck::CORE:ftzero | ||
| 120 | die("'$file' is empty or non-existant"); | ||||
| 121 | } | ||||
| 122 | 1 | 32µs | open(my $fh, '<', $file) or die "Cannot read from $file: $!"; # spent 32µs making 1 call to YAML::Syck::CORE:open | ||
| 123 | 2 | 483µs | Load(do { local $/; <$fh> }); # spent 471µs making 1 call to YAML::Syck::Load
# spent 12µs making 1 call to YAML::Syck::CORE:readline | ||
| 124 | } | ||||
| 125 | } | ||||
| 126 | |||||
| 127 | 1 | 3µs | 1; | ||
| 128 | |||||
| 129 | __END__ | ||||
# spent 14µs within YAML::Syck::CORE:ftis which was called:
# once (14µs+0s) by YAML::Syck::LoadFile at line 119 | |||||
# spent 2µs within YAML::Syck::CORE:ftzero which was called:
# once (2µs+0s) by YAML::Syck::LoadFile at line 119 | |||||
# spent 1µs within YAML::Syck::CORE:match which was called:
# once (1µs+0s) by YAML::Syck::_is_glob at line 86 | |||||
# spent 32µs within YAML::Syck::CORE:open which was called:
# once (32µs+0s) by YAML::Syck::LoadFile at line 122 | |||||
# spent 12µs within YAML::Syck::CORE:readline which was called:
# once (12µs+0s) by YAML::Syck::LoadFile at line 123 | |||||
sub YAML::Syck::LoadYAML; # xsub |