X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FBase.pm;h=86cacf54222ad4526c80d9628946ab4576392e4a;hb=3fea497fec40754dfbe468328ab1319fc9403856;hp=da225f20132400a54e3c3309c20deaf05a9e130c;hpb=26c546800f9a3beacb1392c819cbbbea5c686946;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/lib/DBIx/Class/Schema/Loader/Base.pm b/lib/DBIx/Class/Schema/Loader/Base.pm index da225f2..86cacf5 100644 --- a/lib/DBIx/Class/Schema/Loader/Base.pm +++ b/lib/DBIx/Class/Schema/Loader/Base.pm @@ -25,7 +25,7 @@ use DBIx::Class (); use Class::Load 'load_class'; use namespace::clean; -our $VERSION = '0.07003'; +our $VERSION = '0.07007'; __PACKAGE__->mk_group_ro_accessors('simple', qw/ schema @@ -40,7 +40,7 @@ __PACKAGE__->mk_group_ro_accessors('simple', qw/ skip_relationships skip_load_external moniker_map - column_accessor_map + col_accessor_map custom_column_info inflect_singular inflect_plural @@ -310,7 +310,7 @@ together. Examples: stations_visited | StationVisited routeChange | RouteChange -=head2 column_accessor_map +=head2 col_accessor_map Same as moniker_map, but for column accessor names. If a coderef is passed, the code is called with arguments of @@ -564,6 +564,10 @@ by L. sub new { my ( $class, %args ) = @_; + if (exists $args{column_accessor_map}) { + $args{col_accessor_map} = delete $args{column_accessor_map}; + } + my $self = { %args }; # don't lose undef options @@ -1638,7 +1642,7 @@ EOF } } -# use the same logic to run moniker_map, column_accessor_map, and +# use the same logic to run moniker_map, col_accessor_map, and # relationship_name_map sub _run_user_map { my ( $self, $map, $default_code, $ident, @extra ) = @_; @@ -1676,7 +1680,7 @@ sub _make_column_accessor_name { my ($self, $column_name, $column_context_info ) = @_; my $accessor = $self->_run_user_map( - $self->column_accessor_map, + $self->col_accessor_map, sub { $self->_default_column_accessor_name( shift ) }, $column_name, $column_context_info,