← Index
NYTProf Performance Profile   « line view »
For webmerge/scripts/webmerge.pl
  Run on Mon Oct 7 02:42:42 2013
Reported on Mon Oct 7 03:03:22 2013

Filename/home/ocbnet/domain/ocbnet.ch/vhost/webmerge/htdocs/webmerge/scripts/modules/RTP/Webmerge/IO/JS.pm
StatementsExecuted 15 statements in 2.29ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11187µs366µsRTP::Webmerge::IO::JS::::BEGIN@8RTP::Webmerge::IO::JS::BEGIN@8
11172µs104µsRTP::Webmerge::IO::JS::::BEGIN@10RTP::Webmerge::IO::JS::BEGIN@10
11167µs156µsRTP::Webmerge::IO::JS::::BEGIN@9RTP::Webmerge::IO::JS::BEGIN@9
11158µs58µsRTP::Webmerge::IO::JS::::BEGIN@18.15RTP::Webmerge::IO::JS::BEGIN@18.15
11155µs254µsRTP::Webmerge::IO::JS::::BEGIN@29RTP::Webmerge::IO::JS::BEGIN@29
11132µs32µsRTP::Webmerge::IO::JS::::BEGIN@18RTP::Webmerge::IO::JS::BEGIN@18
11130µs30µsRTP::Webmerge::IO::JS::::BEGIN@21RTP::Webmerge::IO::JS::BEGIN@21
11122µs22µsRTP::Webmerge::IO::JS::::BEGIN@15RTP::Webmerge::IO::JS::BEGIN@15
11122µs22µsRTP::Webmerge::IO::JS::::BEGIN@24RTP::Webmerge::IO::JS::BEGIN@24
0000s0sRTP::Webmerge::IO::JS::::exportJSRTP::Webmerge::IO::JS::exportJS
0000s0sRTP::Webmerge::IO::JS::::importJSRTP::Webmerge::IO::JS::importJS
0000s0sRTP::Webmerge::IO::JS::::readJSRTP::Webmerge::IO::JS::readJS
0000s0sRTP::Webmerge::IO::JS::::writeJSRTP::Webmerge::IO::JS::writeJS
Call graph for these subroutines as a Graphviz dot language file.
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###################################################################################################
5package RTP::Webmerge::IO::JS;
6###################################################################################################
7
82158µs2645µs
# spent 366µs (87+279) within RTP::Webmerge::IO::JS::BEGIN@8 which was called: # once (87µs+279µs) by RTP::Webmerge::Merge::BEGIN@66 at line 8
use Carp;
# spent 366µs making 1 call to RTP::Webmerge::IO::JS::BEGIN@8 # spent 279µs making 1 call to Exporter::import
92149µs2245µs
# spent 156µs (67+89) within RTP::Webmerge::IO::JS::BEGIN@9 which was called: # once (67µs+89µs) by RTP::Webmerge::Merge::BEGIN@66 at line 9
use strict;
# spent 156µs making 1 call to RTP::Webmerge::IO::JS::BEGIN@9 # spent 89µs making 1 call to strict::import
102195µs2136µs
# spent 104µs (72+32) within RTP::Webmerge::IO::JS::BEGIN@10 which was called: # once (72µs+32µs) by RTP::Webmerge::Merge::BEGIN@66 at line 10
use warnings;
# spent 104µs making 1 call to RTP::Webmerge::IO::JS::BEGIN@10 # spent 32µs making 1 call to warnings::import
11
12###################################################################################################
13
14# define our version string
151166µs122µs
# spent 22µs within RTP::Webmerge::IO::JS::BEGIN@15 which was called: # once (22µs+0s) by RTP::Webmerge::Merge::BEGIN@66 at line 15
BEGIN { $RTP::Webmerge::IO::JS::VERSION = "0.8.2" }
# spent 22µs making 1 call to RTP::Webmerge::IO::JS::BEGIN@15
16
17# load exporter and inherit from it
183433µs290µs
# spent 32µs within RTP::Webmerge::IO::JS::BEGIN@18 which was called: # once (32µs+0s) by RTP::Webmerge::Merge::BEGIN@66 at line 18 # spent 58µs within RTP::Webmerge::IO::JS::BEGIN@18.15 which was called: # once (58µs+0s) by RTP::Webmerge::Merge::BEGIN@66 at line 18
BEGIN { use Exporter qw(); our @ISA = qw(Exporter) }
# spent 58µs making 1 call to RTP::Webmerge::IO::JS::BEGIN@18.15 # spent 32µs making 1 call to RTP::Webmerge::IO::JS::BEGIN@18
19
20# define our variables to be exported
211170µs130µs
# spent 30µs within RTP::Webmerge::IO::JS::BEGIN@21 which was called: # once (30µs+0s) by RTP::Webmerge::Merge::BEGIN@66 at line 21
BEGIN { our @EXPORT = qw(readJS importJS exportJS writeJS); }
# spent 30µs making 1 call to RTP::Webmerge::IO::JS::BEGIN@21
22
23# define our functions to be exported
241163µs122µs
# spent 22µs within RTP::Webmerge::IO::JS::BEGIN@24 which was called: # once (22µs+0s) by RTP::Webmerge::Merge::BEGIN@66 at line 24
BEGIN { our @EXPORT_OK = qw(); }
# spent 22µs making 1 call to RTP::Webmerge::IO::JS::BEGIN@24
25
26###################################################################################################
27
28# import webmerge IO file reader and writer
292840µs2453µs
# spent 254µs (55+199) within RTP::Webmerge::IO::JS::BEGIN@29 which was called: # once (55µs+199µs) by RTP::Webmerge::Merge::BEGIN@66 at line 29
use RTP::Webmerge::IO qw(readfile writefile);
# spent 254µs making 1 call to RTP::Webmerge::IO::JS::BEGIN@29 # spent 199µs making 1 call to Exporter::import
30
31###################################################################################################
32
33# read a js file from the disk
34sub readJS
35{
36
37 # get input variables
38 my ($jsfile) = @_;
39
40 # read complete css file
41 my $data = readfile($jsfile);
42
43 # die with an error message that js file is not found
44 die "js file <$jsfile> could not be read: $!\n" unless $data;
45
46 # return as string
47 return $data;
48
49}
50# EO sub readJS
51
52# mangle JS
53sub importJS
54{
55 return 1;
56}
57# EO sub importJS
58
59# mangle JS
60sub exportJS
61{
62 return 1;
63}
64# EO sub exportJS
65
66###################################################################################################
67
68# write a js file to the disk
69sub writeJS
70{
71
72 # get input variables
73 my ($path, $data, $config) = @_;
74
75 # write the content to the file and return result
76 return writefile($path, $data, $config->{'atomic'}, 1)
77
78}
79# EO writeJS
80
81###################################################################################################
82###################################################################################################
83112µs1;