use strict;
use warnings;

package Opts;

sub new
{
    my $class = shift;
    my $this = shift || {};

    for( my $i = 0; $i < $#_; $i += 2 ) # default values
    {
        defined( $this->{ $_[$i] } ) or
            $this->{ $_[$i] } = $_[$i+1];
    }

    return bless( $this, ref( $class ) || $class );
}


1;
