Changeset 13836 for branches/Release01x01/core/lib/Foswiki.pm
- Timestamp:
- 01/27/12 05:14:49 (4 months ago)
- File:
-
- 1 edited
-
branches/Release01x01/core/lib/Foswiki.pm (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/Release01x01/core/lib/Foswiki.pm
r13483 r13836 80 80 our $OC = "<!--\0"; 81 81 our $CC = "\0-->"; 82 83 # This variable is set if Foswiki is running in unit test mode. 84 # It is provided so that modules can detect unit test mode to avoid 85 # corrupting data spaces. 86 our $inUnitTestMode = 0; 87 88 sub SINGLE_SINGLETONS { 0 } 89 sub SINGLE_SINGLETONS_TRACE { 0 } 82 90 83 91 # Returns the full path of the directory containing Foswiki.pm … … 1673 1681 CGI::charset( $Foswiki::cfg{Site}{CharSet} ); 1674 1682 } 1683 if (SINGLE_SINGLETONS_TRACE) { 1684 require Data::Dumper; 1685 print STDERR "new $this: " 1686 . Data::Dumper->Dump( [ [caller], [ caller(1) ] ] ); 1687 } 1675 1688 1676 1689 $this->{request} = $query; … … 1681 1694 # This is required in case we get an exception during 1682 1695 # initialisation, so that we have a session to handle it with. 1696 ASSERT( !$Foswiki::Plugins::SESSION ) if SINGLE_SINGLETONS; 1683 1697 $Foswiki::Plugins::SESSION = $this; 1698 ASSERT( $Foswiki::Plugins::SESSION->isa('Foswiki') ) if DEBUG; 1684 1699 1685 1700 # Tell Foswiki::Response which charset we are using if not default … … 2131 2146 2132 2147 undef $this->{DebugVerificationCode}; # from Foswiki::UI::Register 2148 if (SINGLE_SINGLETONS_TRACE) { 2149 require Data::Dumper; 2150 print STDERR "finish $this: " 2151 . Data::Dumper->Dump( [ [caller], [ caller(1) ] ] ); 2152 } 2153 if (SINGLE_SINGLETONS) { 2154 ASSERT( defined $Foswiki::Plugins::SESSION ); 2155 ASSERT( $Foswiki::Plugins::SESSION == $this ); 2156 ASSERT( $Foswiki::Plugins::SESSION->isa('Foswiki') ); 2157 } 2158 undef $Foswiki::Plugins::SESSION; 2133 2159 2134 2160 if (DEBUG) { … … 2396 2422 2397 2423 # Make sure func works, for registered tag handlers 2424 if (SINGLE_SINGLETONS) { 2425 ASSERT( defined $Foswiki::Plugins::SESSION ); 2426 ASSERT( $Foswiki::Plugins::SESSION == $this ); 2427 } 2398 2428 local $Foswiki::Plugins::SESSION = $this; 2429 ASSERT( $Foswiki::Plugins::SESSION->isa('Foswiki') ) if DEBUG; 2399 2430 2400 2431 my $text = $topicObject->text(); … … 2733 2764 2734 2765 # Make sure func works, for registered tag handlers 2735 $Foswiki::Plugins::SESSION = $this; 2766 if (SINGLE_SINGLETONS) { 2767 ASSERT( defined $Foswiki::Plugins::SESSION ); 2768 ASSERT( $Foswiki::Plugins::SESSION == $this ); 2769 } 2770 local $Foswiki::Plugins::SESSION = $this; 2771 ASSERT( $Foswiki::Plugins::SESSION->isa('Foswiki') ) if DEBUG; 2736 2772 2737 2773 # NOTE TO DEBUGGERS
Note: See TracChangeset
for help on using the changeset viewer.
