sub create { my $self = shift; if ( $self->exists ) { $self->croak('already exists'); } # create the object }