svn-log stealer script
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / CDBICompat / AttributeAPI.pm
CommitLineData
c0e7b4e5 1package # hide from PAUSE
2 DBIx::Class::CDBICompat::AttributeAPI;
fe5d862b 3
4sub _attrs {
5 my ($self, @atts) = @_;
6 return @{$self->{_column_data}}{@atts};
7}
8
9*_attr = \&_attrs;
10
11sub _attribute_store {
12 my $self = shift;
13 my $vals = @_ == 1 ? shift: {@_};
14 my (@cols) = keys %$vals;
15 @{$self->{_column_data}}{@cols} = @{$vals}{@cols};
16}
17
18sub _attribute_set {
19 my $self = shift;
20 my $vals = @_ == 1 ? shift: {@_};
21 $self->set_column($_, $vals->{$_}) for keys %{$vals};
22}
23
24sub _attribute_delete {
25 my ($self, $attr) = @_;
26 delete $self->{_column_data}{$attr};
27}
28
29sub _attribute_exists {
30 my ($self, $attr) = @_;
31 exists $self->{_column_data}{$attr};
32}
33
341;