package StaticVariable;
#$Id: StaticVariable.pm,v 1.1 2000/09/30 09:29:26 tom Exp $
################################################################

my @initializers;

sub RegistInitializer($\&)
{
    my ($class, $func) = @_;

    push(@initializers, $func);
}
sub CallInitializers
{
    for (@initializers){
	&$_;
    }
}


# CLASS->GetStaticVariable($var_name);
#  or
# $obj->GetStaticVariable($var_name);
sub GetStaticVariable($$)
{
    my ($self, $var_name) = @_;

    my $class = (ref $self) ? ref $self : $self;

    return "${class}::$var_name";
}

1;


