From: Peter Rabbitson Date: Mon, 11 Oct 2010 07:37:40 +0000 (+0000) Subject: Put back the private accessor installer method, there are overrides in the wild X-Git-Tag: v0.09008~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8079caebba0d0a5bcf089c8e3f8d9c8e3564a27b;p=p5sagit%2FClass-Accessor-Grouped.git Put back the private accessor installer method, there are overrides in the wild --- diff --git a/lib/Class/Accessor/Grouped.pm b/lib/Class/Accessor/Grouped.pm index 5f9c300..c9ba1be 100644 --- a/lib/Class/Accessor/Grouped.pm +++ b/lib/Class/Accessor/Grouped.pm @@ -137,7 +137,11 @@ my $add_xs_accessor = sub { }; }; -my $install_group_accessors = sub { +# Yes this method is undocumented +# Yes it should be a private coderef like the one above it +# No we can't do that (yet) because the DBIC-CDBI compat layer overrides it +# %$*@!?&!&#*$!!! +sub _mk_group_accessors { my($self, $maker, $group, @fields) = @_; my $class = Scalar::Util::blessed $self || $self; @@ -217,7 +221,7 @@ be of the form [ $accessor, $field ]. sub mk_group_accessors { my ($self, $group, @fields) = @_; - $self->$install_group_accessors('make_group_accessor', $group, @fields); + $self->_mk_group_accessors('make_group_accessor', $group, @fields); return; } @@ -240,7 +244,7 @@ rather than setting the value. sub mk_group_ro_accessors { my($self, $group, @fields) = @_; - $self->$install_group_accessors('make_group_ro_accessor', $group, @fields); + $self->_mk_group_accessors('make_group_ro_accessor', $group, @fields); } =head2 mk_group_wo_accessors @@ -262,7 +266,7 @@ value rather than getting the value. sub mk_group_wo_accessors { my($self, $group, @fields) = @_; - $self->$install_group_accessors('make_group_wo_accessor', $group, @fields); + $self->_mk_group_accessors('make_group_wo_accessor', $group, @fields); } =head2 make_group_accessor