| Filename | /usr/share/koha/lib/Koha/QueryParser/Driver/PQF/Util.pm |
| Statements | Executed 10 statements in 285µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 24µs | 77µs | Koha::QueryParser::Driver::PQF::Util::BEGIN@2 |
| 1 | 1 | 1 | 10µs | 14µs | Koha::QueryParser::Driver::PQF::Util::BEGIN@4 |
| 1 | 1 | 1 | 10µs | 22µs | Koha::QueryParser::Driver::PQF::Util::BEGIN@5 |
| 0 | 0 | 0 | 0s | 0s | Koha::QueryParser::Driver::PQF::Util::attributes_to_attr_string |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Koha::QueryParser::Driver::PQF::Util; | ||||
| 2 | 3 | 38µs | 2 | 129µs | # spent 77µs (24+52) within Koha::QueryParser::Driver::PQF::Util::BEGIN@2 which was called:
# once (24µs+52µs) by Koha::QueryParser::Driver::PQF::BEGIN@8 at line 2 # spent 77µs making 1 call to Koha::QueryParser::Driver::PQF::Util::BEGIN@2
# spent 52µs making 1 call to Exporter::import |
| 3 | |||||
| 4 | 3 | 27µs | 2 | 18µs | # spent 14µs (10+4) within Koha::QueryParser::Driver::PQF::Util::BEGIN@4 which was called:
# once (10µs+4µs) by Koha::QueryParser::Driver::PQF::BEGIN@8 at line 4 # spent 14µs making 1 call to Koha::QueryParser::Driver::PQF::Util::BEGIN@4
# spent 4µs making 1 call to strict::import |
| 5 | 3 | 217µs | 2 | 34µs | # spent 22µs (10+12) within Koha::QueryParser::Driver::PQF::Util::BEGIN@5 which was called:
# once (10µs+12µs) by Koha::QueryParser::Driver::PQF::BEGIN@8 at line 5 # spent 22µs making 1 call to Koha::QueryParser::Driver::PQF::Util::BEGIN@5
# spent 12µs making 1 call to warnings::import |
| 6 | |||||
| 7 | =head1 NAME | ||||
| 8 | |||||
| - - | |||||
| 23 | sub attributes_to_attr_string { | ||||
| 24 | my ($attributes) = @_; | ||||
| 25 | my $attr_string = ''; | ||||
| 26 | my $key; | ||||
| 27 | my $value; | ||||
| 28 | while (($key, $value) = each(%$attributes)) { | ||||
| 29 | next unless looks_like_number($key); | ||||
| 30 | $attr_string .= ' @attr ' . $key . '=' . $value . ' '; | ||||
| 31 | } | ||||
| 32 | $attr_string =~ s/^\s*//; | ||||
| 33 | $attr_string =~ s/\s*$//; | ||||
| 34 | $attr_string .= ' ' . $attributes->{''} if defined $attributes->{''}; | ||||
| 35 | return $attr_string; | ||||
| 36 | } | ||||
| 37 | |||||
| 38 | 1 | 3µs | 1; |