my $god = Product->new('religion'); if ( $god->exists ) { # Product::Real } else { # Product::Potential } #### sub create { my $self = shift; if ( $self->exists ) { $self->croak('already exists'); } # create the object }