Flail::Config - configuration control


flail documentation Contained in the flail distribution.

Index


Code Index:

NAME

Top

Flail::Config - configuration control

VERSION

Top

  Time-stamp: <2006-12-04 18:25:45 attila@stalphonsos.com>

SYNOPSIS

Top

  use Flail::Config;
  blah;

DESCRIPTION

Top

Describe the module.

AUTHOR

Top

  attila <attila@stalphonsos.com>

COPYRIGHT AND LICENSE

Top


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:
##