| Filename | /home/ocbnet/domain/ocbnet.ch/vhost/webmerge/htdocs/webmerge/scripts/modules/RTP/Webmerge/Include/CSS.pm |
| Statements | Executed 25 statements in 2.01ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 2 | 1 | 1 | 128µs | 224µs | RTP::Webmerge::Include::CSS::includeCSS |
| 1 | 1 | 1 | 83µs | 332µs | RTP::Webmerge::Include::CSS::BEGIN@8 |
| 1 | 1 | 1 | 55µs | 55µs | RTP::Webmerge::Include::CSS::BEGIN@18.20 |
| 1 | 1 | 1 | 55µs | 228µs | RTP::Webmerge::Include::CSS::BEGIN@25 |
| 1 | 1 | 1 | 52µs | 82µs | RTP::Webmerge::Include::CSS::BEGIN@10 |
| 1 | 1 | 1 | 51µs | 136µs | RTP::Webmerge::Include::CSS::BEGIN@9 |
| 1 | 1 | 1 | 29µs | 29µs | RTP::Webmerge::Include::CSS::BEGIN@21 |
| 1 | 1 | 1 | 25µs | 25µs | RTP::Webmerge::Include::CSS::BEGIN@18 |
| 1 | 1 | 1 | 23µs | 23µs | RTP::Webmerge::Include::CSS::BEGIN@15 |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | ################################################################################################### | ||||
| 2 | # Copyright 2013 by Marcel Greter | ||||
| 3 | # This file is part of Webmerge (GPL3) | ||||
| 4 | ################################################################################################### | ||||
| 5 | package RTP::Webmerge::Include::CSS; | ||||
| 6 | ################################################################################################### | ||||
| 7 | |||||
| 8 | 2 | 153µs | 2 | 580µs | # spent 332µs (83+249) within RTP::Webmerge::Include::CSS::BEGIN@8 which was called:
# once (83µs+249µs) by RTP::Webmerge::Merge::CSS::BEGIN@58 at line 8 # spent 332µs making 1 call to RTP::Webmerge::Include::CSS::BEGIN@8
# spent 249µs making 1 call to Exporter::import |
| 9 | 2 | 136µs | 2 | 222µs | # spent 136µs (51+85) within RTP::Webmerge::Include::CSS::BEGIN@9 which was called:
# once (51µs+85µs) by RTP::Webmerge::Merge::CSS::BEGIN@58 at line 9 # spent 136µs making 1 call to RTP::Webmerge::Include::CSS::BEGIN@9
# spent 85µs making 1 call to strict::import |
| 10 | 2 | 210µs | 2 | 113µs | # spent 82µs (52+30) within RTP::Webmerge::Include::CSS::BEGIN@10 which was called:
# once (52µs+30µs) by RTP::Webmerge::Merge::CSS::BEGIN@58 at line 10 # spent 82µs making 1 call to RTP::Webmerge::Include::CSS::BEGIN@10
# spent 30µs making 1 call to warnings::import |
| 11 | |||||
| 12 | ################################################################################################### | ||||
| 13 | |||||
| 14 | # define our version string | ||||
| 15 | 1 | 193µs | 1 | 23µs | # spent 23µs within RTP::Webmerge::Include::CSS::BEGIN@15 which was called:
# once (23µs+0s) by RTP::Webmerge::Merge::CSS::BEGIN@58 at line 15 # spent 23µs making 1 call to RTP::Webmerge::Include::CSS::BEGIN@15 |
| 16 | |||||
| 17 | # load exporter and inherit from it | ||||
| 18 | 3 | 416µs | 2 | 81µs | BEGIN { use Exporter qw(); our @ISA = qw(Exporter) } # spent 55µs making 1 call to RTP::Webmerge::Include::CSS::BEGIN@18.20
# spent 25µs making 1 call to RTP::Webmerge::Include::CSS::BEGIN@18 |
| 19 | |||||
| 20 | # define our functions to be exported | ||||
| 21 | 1 | 150µs | 1 | 29µs | # spent 29µs within RTP::Webmerge::Include::CSS::BEGIN@21 which was called:
# once (29µs+0s) by RTP::Webmerge::Merge::CSS::BEGIN@58 at line 21 # spent 29µs making 1 call to RTP::Webmerge::Include::CSS::BEGIN@21 |
| 22 | |||||
| 23 | ################################################################################################### | ||||
| 24 | |||||
| 25 | 2 | 590µs | 2 | 400µs | # spent 228µs (55+173) within RTP::Webmerge::Include::CSS::BEGIN@25 which was called:
# once (55µs+173µs) by RTP::Webmerge::Merge::CSS::BEGIN@58 at line 25 # spent 228µs making 1 call to RTP::Webmerge::Include::CSS::BEGIN@25
# spent 172µs making 1 call to Exporter::import |
| 26 | |||||
| 27 | ################################################################################################### | ||||
| 28 | |||||
| 29 | # css header include | ||||
| 30 | #************************************************************************************************** | ||||
| 31 | 1 | 4µs | our $css_dev_header = ''; | ||
| 32 | |||||
| 33 | ################################################################################################### | ||||
| 34 | |||||
| 35 | # called via array map | ||||
| 36 | #************************************************************************************************** | ||||
| 37 | sub includeCSS | ||||
| 38 | # spent 224µs (128+95) within RTP::Webmerge::Include::CSS::includeCSS which was called 2 times, avg 112µs/call:
# 2 times (128µs+95µs) by RTP::Webmerge::Merge::CSS::__ANON__[/home/ocbnet/domain/ocbnet.ch/vhost/webmerge/htdocs/webmerge/scripts/modules/RTP/Webmerge/Merge/CSS.pm:62] at line 62 of webmerge/scripts/modules/RTP/Webmerge/Merge/CSS.pm, avg 112µs/call | ||||
| 39 | |||||
| 40 | # get passed variables | ||||
| 41 | 2 | 10µs | my ($config) = @_; | ||
| 42 | |||||
| 43 | # magick map variable | ||||
| 44 | 2 | 4µs | my $data = $_; | ||
| 45 | |||||
| 46 | # define the template for the script includes (don't care about doctype versions, dev only) | ||||
| 47 | 2 | 7µs | my $css_include_tmpl = '@import url(\'%s\');' . "\n"; | ||
| 48 | |||||
| 49 | # get a unique path with added fingerprint (query or directory) | ||||
| 50 | 2 | 60µs | 2 | 96µs | my $path = fingerprint($config, 'dev', $data->{'local_path'}, $data->{'org'}); # spent 96µs making 2 calls to RTP::Webmerge::Fingerprint::fingerprint, avg 48µs/call |
| 51 | |||||
| 52 | # return the script include string | ||||
| 53 | 2 | 70µs | return sprintf($css_include_tmpl, $path); | ||
| 54 | |||||
| 55 | } | ||||
| 56 | # EO sub includeCSS | ||||
| 57 | |||||
| 58 | ################################################################################################### | ||||
| 59 | ################################################################################################### | ||||
| 60 | 1 | 12µs | 1; |