Skip to content

Commit

Permalink
Merge pull request #335 from dpvc/fix-default-context
Browse files Browse the repository at this point in the history
Make sure initial context is Numeric
  • Loading branch information
mgage committed Dec 30, 2017
2 parents 43745d0 + 660d94d commit ed8c717
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions macros/Parser.pl
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,10 @@ =head2 Context
# ^uses Parser::Context::current
# ^uses %context
sub Context {Parser::Context->current(\%context,@_)}
unless (%context && $context{current}) {
# ^variable our %context
%context = (); # Locally defined contexts, including 'current' context
# ^uses Context
Context(); # Initialize context (for persistent mod_perl)
}
# # ^variable our %context
%context = () unless %context; # Locally defined contexts, including 'current' context
# ^uses Context
Context("Numeric"); # Set initial context

###########################################################################
#
Expand Down

0 comments on commit ed8c717

Please sign in to comment.