Acme-BloodType

 view release on metacpan or  search on metacpan

lib/Acme/BloodType.pm  view on Meta::CPAN

		$self->{'genotype'} = $init->{'genotype'};
	} elsif (defined $init && defined $init->{'phenotype'}) {
		my @possible = grep { $geno_pheno->{$_} eq $init->{'phenotype'} } keys %$geno_pheno;
		return undef unless @possible;
		$self->{'genotype'} = $possible[rand @possible];
	} else {
		my @possible = keys %$geno_pheno;
		$self->{'genotype'} = $possible[rand @possible];
	}

	return bless $self, $class;
}

=head2 $bt->get_bloodtype

Get the bloodtype (phenotype) of this person. Returns "A", "B", "AB", or "O".

=cut

sub get_bloodtype {
	my ($self) = @_;



( run in 0.509 second using v1.01-cache-2.11-cpan-6aa56a78535 )