← Index
NYTProf Performance Profile   « block view • line view • sub view »
For /usr/local/src/github.com/foswiki/core/bin/view
  Run on Sun Dec 4 17:17:59 2011
Reported on Sun Dec 4 17:26:32 2011

Filename/usr/local/src/github.com/foswiki/core/bin/setlib.cfg
StatementsExecuted 24 statements in 976µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1115.36ms5.99msFoswiki::::BEGIN@28Foswiki::BEGIN@28
11120µs99µ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
182123µs2178µs
# spent 99µs (20+79) within Foswiki::BEGIN@18 which was called: # once (20µs+79µs) by main::BEGIN@8 at line 18
use vars qw( $foswikiLibPath @localPerlLibPath );
# spent 99µs making 1 call to Foswiki::BEGIN@18 # spent 79µs making 1 call to vars::import
19
2012µsmy $LocalLib = __FILE__; # the dir where this setlib.cfg resides
21116µs16µs$LocalLib =~ s/setlib.cfg$/LocalLib.cfg/;
# spent 6µs making 1 call to Foswiki::CORE:subst
22114µs17µsrequire $LocalLib if -r $LocalLib;
# spent 7µs making 1 call to Foswiki::CORE:fteread
23# if foswikiLibPath isn't defined, then see if $twikiLibPath is
24# for compatibility
2512µs$foswikiLibPath = $twikiLibPath unless defined( $foswikiLibPath );
26
2713µsunless (( defined ($foswikiLibPath) ) and (-e $foswikiLibPath)) {
282559µs26.12ms
# spent 5.99ms (5.36+629µs) within Foswiki::BEGIN@28 which was called: # once (5.36ms+629µs) by main::BEGIN@8 at line 28
use Cwd qw( abs_path );
# spent 5.99ms making 1 call to Foswiki::BEGIN@28 # spent 128µs making 1 call to Exporter::import
2912µs my $bindir = __FILE__;
3019µs13µs $bindir =~ s/setlib.cfg$//;
# spent 3µs making 1 call to Foswiki::CORE:subst
31152µs234µs ( $foswikiLibPath ) = ($foswikiLibPath = Cwd::abs_path( "$bindir../lib" )) =~ /(.*)/;
# spent 30µs making 1 call to Cwd::abs_path # spent 4µs making 1 call to Foswiki::CORE:match
32}
3312µsif ($foswikiLibPath eq "") {
34 $foswikiLibPath = "../lib";
35 warn "using relative path for libs - some plugins may break";
36}
37
38# Path to local Perl modules
3912µsmy $defaultingCPANBASE = !defined($CPANBASE);
4013µs$CPANBASE = "$foswikiLibPath/CPAN/lib" unless $CPANBASE;
41116µs16µsif ( -e $CPANBASE ) {
# spent 6µs making 1 call to Foswiki::CORE:ftis
421109µs require Config;
43115µs18µs my $VER = $Config::Config{version};
# spent 8µs making 1 call to Config::FETCH
4419µs16µs my $SITEARCH = $Config::Config{archname};
# spent 6µs making 1 call to Config::FETCH
4516µs push @localPerlLibPath, ( "$CPANBASE/arch", "$CPANBASE/$VER/$SITEARCH", "$CPANBASE/$VER", "$CPANBASE" );
46}
47
48# Prepend to @INC, the Perl search path for modules
4914µsunshift @INC, $foswikiLibPath;
5013µsif ($defaultingCPANBASE) {
5113µs push @INC, @localPerlLibPath if @localPerlLibPath;
52} else {
53 unshift @INC, @localPerlLibPath if @localPerlLibPath;
54}
55
56125µs1; # Return success for module loading
57
58__END__