update my own contrib entry
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / CDBICompat / AttributeAPI.pm
CommitLineData
75d07914 1package # hide from PAUSE
c0e7b4e5 2 DBIx::Class::CDBICompat::AttributeAPI;
fe5d862b 3
bf5ecff9 4use strict;
5use warnings;
6
fe5d862b 7sub _attrs {
8 my ($self, @atts) = @_;
9 return @{$self->{_column_data}}{@atts};
10}
11
12*_attr = \&_attrs;
13
14sub _attribute_store {
15 my $self = shift;
16 my $vals = @_ == 1 ? shift: {@_};
8f7e9222 17 $self->store_column($_, $vals->{$_}) for keys %{$vals};
fe5d862b 18}
19
20sub _attribute_set {
21 my $self = shift;
22 my $vals = @_ == 1 ? shift: {@_};
23 $self->set_column($_, $vals->{$_}) for keys %{$vals};
24}
25
26sub _attribute_delete {
27 my ($self, $attr) = @_;
28 delete $self->{_column_data}{$attr};
29}
30
31sub _attribute_exists {
32 my ($self, $attr) = @_;
8f7e9222 33 $self->has_column_loaded($attr);
fe5d862b 34}
35
361;