June 27, 2007 Component-Focused Testing Back

Configure.pl: Use a Singleton

    my $singleton;
    BEGIN {
        $singleton = {
            steps   => [],
            data    => Parrot::Configure::Data->new,
            options => Parrot::Configure::Data->new,
        };
        bless $singleton, "Parrot::Configure";
    }
    sub new {
        my $class = shift;
        return $singleton;
    }
continued...


Home Last TOC Copyright © 2007 James E Keenan Back Next