X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FUUIDColumns.pm;h=efbe3d4912b504ac2516a720d9f75802f27f55a8;hb=5ef3e508fa20d477b62406146cdca0ae658c10dd;hp=dca0c58d03e62fbf59352b352a4195d0cd915a99;hpb=3712e4f41b929456d8fad713ca702e4a48e9a940;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/UUIDColumns.pm b/lib/DBIx/Class/UUIDColumns.pm index dca0c58..efbe3d4 100644 --- a/lib/DBIx/Class/UUIDColumns.pm +++ b/lib/DBIx/Class/UUIDColumns.pm @@ -13,11 +13,11 @@ DBIx::Class::UUIDColumns - Implicit uuid columns pacakge Artist; __PACKAGE__->load_components(qw/UUIDColumns Core DB/); - __PACKAGE__->uuid_columns( 'artist_id' );x + __PACKAGE__->uuid_columns( 'artist_id' ); =head1 DESCRIPTION -This L component resambles the behaviour of +This L component resembles the behaviour of L, to make some columns implicitly created as uuid. Note that the component needs to be loaded before Core. @@ -32,18 +32,18 @@ Note that the component needs to be loaded before Core. sub uuid_columns { my $self = shift; for (@_) { - die "column $_ doesn't exist" unless $self->has_column($_); + $self->throw_exception("column $_ doesn't exist") unless $self->has_column($_); } $self->uuid_auto_columns(\@_); } sub insert { - my ($self) = @_; + my $self = shift; for my $column (@{$self->uuid_auto_columns}) { $self->store_column( $column, $self->get_uuid ) unless defined $self->get_column( $column ); } - $self->next::method; + $self->next::method(@_); } sub get_uuid {