1 package # hide from PAUSE
2 DBIx::Class::CDBICompat::Copy;
11 DBIx::Class::CDBICompat::Copy - Emulates Class::DBI->copy($new_id)
15 See DBIx::Class::CDBICompat for directions for use.
19 Emulates C<<Class::DBI->copy($new_id)>>.
24 # CDBI's copy will take an id in addition to a hash ref.
27 return $self->next::method($arg) if ref $arg;
29 my @primary_columns = $self->primary_columns;
30 croak("Need hash-ref to edit copied column values")
31 if @primary_columns > 1;
33 return $self->next::method({ $primary_columns[0] => $arg });