← Index
NYTProf Performance Profile   « line view »
For ./view
  Run on Fri Jul 31 19:05:14 2015
Reported on Fri Jul 31 19:08:08 2015

Filename/var/www/foswiki11/bin/setlib.cfg
StatementsExecuted 20 statements in 1.10ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1115.68ms6.14msFoswiki::::BEGIN@28Foswiki::BEGIN@28
11138µs84µsFoswiki::::BEGIN@18Foswiki::BEGIN@18
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# See bottom of file for license and copyright information
2#
3# setlib.cfg: determines the defaults for Foswiki and Perl library paths
4
5###########################################################################
6# DO NOT CHANGE THIS FILE - instead, create a file called LocalLib.cfg #
7# using the LocalLib.cfg.txt template file and customise your settings in #
8# there. They will override any settings in this file. #
9###########################################################################
10
11# for development, you can enable ASSERTS by adding
12# $ENV{FOSWIKI_ASSERTS} = 1;
13# to your bin/LocalLib.cfg
14
15# Declare package Foswiki, so globals end up in $Foswiki space
16package Foswiki;
17
182148µs2129µs
# spent 84µs (38+45) within Foswiki::BEGIN@18 which was called: # once (38µs+45µs) by main::BEGIN@6 at line 18
use vars qw( $foswikiLibPath @localPerlLibPath );
# spent 84µs making 1 call to Foswiki::BEGIN@18 # spent 45µs making 1 call to vars::import
19
2011µsmy $LocalLib = __FILE__; # the dir where this setlib.cfg resides
2116µs$LocalLib =~ s/setlib.cfg$/LocalLib.cfg/;
221107µsrequire $LocalLib if -r $LocalLib;
23# if foswikiLibPath isn't defined, then see if $twikiLibPath is
24# for compatibility
251600ns$foswikiLibPath = $twikiLibPath unless defined( $foswikiLibPath );
26
2717µsunless (( defined ($foswikiLibPath) ) and (-e $foswikiLibPath)) {
282652µs26.19ms
# spent 6.14ms (5.68+465µs) within Foswiki::BEGIN@28 which was called: # once (5.68ms+465µs) by main::BEGIN@6 at line 28
use Cwd qw( abs_path );
# spent 6.14ms making 1 call to Foswiki::BEGIN@28 # spent 44µs making 1 call to Exporter::import
29 my $bindir = __FILE__;
30 $bindir =~ s/setlib.cfg$//;
31 ( $foswikiLibPath ) = ($foswikiLibPath = Cwd::abs_path( "$bindir../lib" )) =~ /(.*)/;
32}
331600nsif ($foswikiLibPath eq "") {
34 $foswikiLibPath = "../lib";
35 warn "using relative path for libs - some plugins may break";
36}
37
38# Path to local Perl modules
3911µsmy $defaultingCPANBASE = !defined($CPANBASE);
4012µs$CPANBASE = "$foswikiLibPath/CPAN/lib" unless $CPANBASE;
4114µsif ( -e $CPANBASE ) {
421118µs require Config;
43111µs15µs my $VER = $Config::Config{version};
# spent 5µs making 1 call to Config::FETCH
4415µs13µs my $SITEARCH = $Config::Config{archname};
# spent 3µs making 1 call to Config::FETCH
4515µs push @localPerlLibPath, ( "$CPANBASE/arch", "$CPANBASE/$VER/$SITEARCH", "$CPANBASE/$VER", "$CPANBASE" );
46}
47
48# Prepend to @INC, the Perl search path for modules
4912µsunshift @INC, $foswikiLibPath;
5012µsif ($defaultingCPANBASE) {
51 push @INC, @localPerlLibPath if @localPerlLibPath;
52} else {
53 unshift @INC, @localPerlLibPath if @localPerlLibPath;
54}
55
56126µs1; # Return success for module loading
57
58__END__