my $factory=class->new({config_file => "file.xml"}); my $obj=$factory->give_me_my_object(\%data);