[system] / trunk / pg / lib / Parser / Context.pm Repository:
ViewVC logotype

Diff of /trunk/pg/lib/Parser/Context.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 4927 Revision 4928
114# Get a named context 114# Get a named context
115# (either from the main list or a copy from the default list) 115# (either from the main list or a copy from the default list)
116# 116#
117sub get { 117sub get {
118 my $self = shift; my $contextTable = shift; my $name = shift; 118 my $self = shift; my $contextTable = shift; my $name = shift;
119 $contextTable = $userContext unless $contextTable;
119 my $context = $contextTable->{$name}; 120 my $context = $contextTable->{$name};
120 return $context if $context; 121 return $context if $context;
121 $context = $Parser::Context::Default::context{$name}; 122 $context = $Parser::Context::Default::context{$name};
123 return unless $context;
124 return $context->copy;
125}
126
127#
128# Get a copy of named context
129#
130sub getCopy {
131 my $self = shift; my $contextTable = shift; my $name = shift;
132 $contextTable = $userContext unless $contextTable;
133 my $context = $contextTable->{$name};
134 $context = $Parser::Context::Default::context{$name} unless $context;
122 return unless $context; 135 return unless $context;
123 return $context->copy; 136 return $context->copy;
124} 137}
125 138
126# 139#

Legend:
Removed from v.4927  
changed lines
  Added in v.4928

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9