| flail documentation | Contained in the flail distribution. |
Flail::Config - configuration control
Time-stamp: <2006-12-04 18:25:45 attila@stalphonsos.com>
use Flail::Config; blah;
Describe the module.
attila <attila@stalphonsos.com>
(C) 2002-2006 by attila <attila@stalphonsos.com>. all rights reserved. This code is released under a BSD license. See the LICENSE file that came with the package.
| flail documentation | Contained in the flail distribution. |
package Flail::Config; use strict; use Carp; use Flail::Thing; use base qw(Flail::Thing); sub _struct { shift->SUPER::_struct, ( 'args' => undef, 'globals' => {}, ); } sub Default { return $Flail::Config::FIRST; } sub _init_new { my $self = shift->SUPER::_init_new(@_); $Flail::Config::FIRST ||= $self; return $self; } sub load_globals_in_main { foreach (keys %{$self->globals}) { my($name,$val) = ($_,$self->globals->{$_}); $val = &$val($self,$name) if (ref($val) eq 'CODE'); eval "\$::${name}=\"${val}\";"; ($::Debug || $@) && warn(qq|load_globals_in_main: $name => "$val" ($@)\n|); } } sub get { } sub set { } sub load { } 1; __END__
## # Local variables: # mode: perl # tab-width: 4 # perl-indent-level: 4 # cperl-indent-level: 4 # cperl-continued-statement-offset: 4 # indent-tabs-mode: nil # comment-column: 40 # time-stamp-line-limit: 40 # End: ##