X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FCDBICompat%2FCopy.pm;h=0ab6092f62eb3191ff31bdfaec8fa9ecaeb86f59;hb=7f3fd2621c5509873aa30e7a68b7dd670421cc86;hp=b11eca8f1d9ff464dcf60095edb4f2ae5a23d11e;hpb=c0494fe173384e4fdde1f165f0670aeb5dc084a8;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/CDBICompat/Copy.pm b/lib/DBIx/Class/CDBICompat/Copy.pm index b11eca8..0ab6092 100644 --- a/lib/DBIx/Class/CDBICompat/Copy.pm +++ b/lib/DBIx/Class/CDBICompat/Copy.pm @@ -6,11 +6,26 @@ use warnings; use Carp; +=head1 NAME + +DBIx::Class::CDBICompat::Copy - Emulates Class::DBI->copy($new_id) + +=head1 SYNOPSIS + +See DBIx::Class::CDBICompat for usage directions. + +=head1 DESCRIPTION + +Emulates C<copy($new_id)>>. + +=cut + + # CDBI's copy will take an id in addition to a hash ref. sub copy { my($self, $arg) = @_; return $self->next::method($arg) if ref $arg; - + my @primary_columns = $self->primary_columns; croak("Need hash-ref to edit copied column values") if @primary_columns > 1;