Changeset 13826 for trunk/core/lib/Foswiki.pm
- Timestamp:
- 01/26/12 02:45:28 (4 months ago)
- File:
-
- 1 edited
-
trunk/core/lib/Foswiki.pm (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/lib/Foswiki.pm
r13394 r13826 85 85 # corrupting data spaces. 86 86 our $inUnitTestMode = 0; 87 88 sub SINGLE_SINGLETONS { 0 } 89 sub SINGLE_SINGLETONS_TRACE { 0 } 87 90 88 91 # Returns the full path of the directory containing Foswiki.pm … … 1665 1668 my $this = bless( { sandbox => 'Foswiki::Sandbox' }, $class ); 1666 1669 1670 if (SINGLE_SINGLETONS_TRACE) { 1671 require Data::Dumper; 1672 print STDERR "new $this: " 1673 . Data::Dumper->Dump( [ [caller], [ caller(1) ] ] ); 1674 } 1675 1667 1676 # Tell Foswiki::Response which charset we are using if not default 1668 1677 $Foswiki::cfg{Site}{CharSet} ||= 'iso-8859-1'; … … 1675 1684 # This is required in case we get an exception during 1676 1685 # initialisation, so that we have a session to handle it with. 1686 ASSERT( !$Foswiki::Plugins::SESSION ) if SINGLE_SINGLETONS; 1677 1687 $Foswiki::Plugins::SESSION = $this; 1688 ASSERT( $Foswiki::Plugins::SESSION->isa('Foswiki') ) if DEBUG; 1678 1689 1679 1690 # hash of zone records … … 2132 2143 2133 2144 undef $this->{DebugVerificationCode}; # from Foswiki::UI::Register 2145 if (SINGLE_SINGLETONS_TRACE) { 2146 require Data::Dumper; 2147 print STDERR "finish $this: " 2148 . Data::Dumper->Dump( [ [caller], [ caller(1) ] ] ); 2149 } 2150 if (SINGLE_SINGLETONS) { 2151 ASSERT( defined $Foswiki::Plugins::SESSION ); 2152 ASSERT( $Foswiki::Plugins::SESSION == $this ); 2153 ASSERT( $Foswiki::Plugins::SESSION->isa('Foswiki') ); 2154 } 2155 undef $Foswiki::Plugins::SESSION; 2134 2156 2135 2157 if (DEBUG) { … … 2400 2422 2401 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 } 2402 2428 local $Foswiki::Plugins::SESSION = $this; 2429 ASSERT( $Foswiki::Plugins::SESSION->isa('Foswiki') ) if DEBUG; 2403 2430 2404 2431 my $text = $topicObject->text(); … … 2729 2756 2730 2757 # Make sure func works, for registered tag handlers 2731 $Foswiki::Plugins::SESSION = $this; 2758 if (SINGLE_SINGLETONS) { 2759 ASSERT( defined $Foswiki::Plugins::SESSION ); 2760 ASSERT( $Foswiki::Plugins::SESSION == $this ); 2761 } 2762 local $Foswiki::Plugins::SESSION = $this; 2763 ASSERT( $Foswiki::Plugins::SESSION->isa('Foswiki') ) if DEBUG; 2732 2764 2733 2765 # NOTE TO DEBUGGERS
Note: See TracChangeset
for help on using the changeset viewer.
