X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FUniqueIdentifier.pm;h=8621da0a9001b4a5b22b4dee45a7405ecad90cc9;hb=2edf33525bc7be0824693925c528791d84db98aa;hp=955529da8ae8f54a477b8777feb155224020b77e;hpb=8b9473f535c78bab500ff7e1258bd9fcab3e4ff6;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/UniqueIdentifier.pm b/lib/DBIx/Class/Storage/DBI/UniqueIdentifier.pm index 955529d..8621da0 100644 --- a/lib/DBIx/Class/Storage/DBI/UniqueIdentifier.pm +++ b/lib/DBIx/Class/Storage/DBI/UniqueIdentifier.pm @@ -38,7 +38,8 @@ In which case it is used as the name of database function to create a new GUID, =item coderef In which case the coderef should return a string GUID, using L, or -whatever GUID generation method you prefer. +whatever GUID generation method you prefer. It is passed the C<$self> +L reference as a parameter. =back @@ -97,7 +98,7 @@ sub _prefetch_autovalues { } if (ref $guid_method eq 'CODE') { - $to_insert->{$guid_col} = $guid_method->(); + $to_insert->{$guid_col} = $guid_method->($self); } else { ($to_insert->{$guid_col}) = $self->_get_dbh->selectrow_array("SELECT $guid_method");