X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FCDBICompat%2FCopy.pm;h=ec2e9ca8c1e2666b17cb4a1d49e8e44b26ad5387;hb=5e0eea35;hp=414cbd66d0d50cfafab02f5a4607e7749ad84bc1;hpb=d03c070640a8a9a187ba4fa21d645287029abfca;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/CDBICompat/Copy.pm b/lib/DBIx/Class/CDBICompat/Copy.pm index 414cbd6..ec2e9ca 100644 --- a/lib/DBIx/Class/CDBICompat/Copy.pm +++ b/lib/DBIx/Class/CDBICompat/Copy.pm @@ -4,15 +4,17 @@ package # hide from PAUSE use strict; use warnings; +use base 'DBIx::Class'; + use Carp; =head1 NAME -DBIx::Class::CDBICompat::Copy +DBIx::Class::CDBICompat::Copy - Emulates Class::DBI->copy($new_id) =head1 SYNOPSIS -See DBIx::Class::CDBICompat for directions for use. +See DBIx::Class::CDBICompat for usage directions. =head1 DESCRIPTION @@ -25,7 +27,7 @@ Emulates C<copy($new_id)>>. 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; @@ -33,4 +35,17 @@ sub copy { return $self->next::method({ $primary_columns[0] => $arg }); } +=head1 FURTHER QUESTIONS? + +Check the list of L. + +=head1 COPYRIGHT AND LICENSE + +This module is free software L +by the L. You can +redistribute it and/or modify it under the same terms as the +L. + +=cut + 1;