diff options
| author | fukachan <fukachan> | 2006-02-03 04:17:18 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2006-02-03 04:17:18 +0000 |
| commit | 779f55a498e1abedfeeca2713fc3f47d4376f23e (patch) | |
| tree | 497ddb1c01269347669e3d2a1f6af7aea61403c2 /fml/lib | |
| parent | f40747099e2565f5a2c6bf8fe7f88fd562c3ac65 (diff) | |
| download | fml8-779f55a498e1abedfeeca2713fc3f47d4376f23e.tar.gz fml8-779f55a498e1abedfeeca2713fc3f47d4376f23e.tar.bz2 fml8-779f55a498e1abedfeeca2713fc3f47d4376f23e.zip | |
define {set,get}_context() method.context-switch-safe-base
Diffstat (limited to 'fml/lib')
| -rw-r--r-- | fml/lib/FML/Config.pm | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/fml/lib/FML/Config.pm b/fml/lib/FML/Config.pm index 7864eec2..06d98eb0 100644 --- a/fml/lib/FML/Config.pm +++ b/fml/lib/FML/Config.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Config.pm,v 1.100 2005/08/20 01:27:31 fukachan Exp $ +# $FML: Config.pm,v 1.101 2006/01/09 14:00:53 fukachan Exp $ # package FML::Config; @@ -1161,6 +1161,44 @@ sub get_hook } +=head1 CONTEXT SWITCHING + +=head2 set_context($context) + +set up context identifier. + +=head2 get_context + +return context identifier. + +=cut + + +# Descriptions: set up context. +# Arguments: OBJ($self) STR($context) +# Side Effects: update $current_context variable. +# Return Value: none +sub set_context +{ + my ($self, $context) = @_; + my $saved_context = $self->get_context(); + + # initialize; + $current_context = $context; +} + + +# Descriptions: get context. +# Arguments: OBJ($self) STR($context) +# Side Effects: none +# Return Value: STR +sub get_context +{ + my ($self) = @_; + return $current_context; +} + + =head1 TIEED HASH tie() operations for hash are binded to \%_fml_config. |
