Remove Class::Data::Inheritable and use CAG 'inherited' style accessors
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / CDBICompat / Relationship.pm
CommitLineData
a9c8094b 1package
2 DBIx::Class::CDBICompat::Relationship;
3
4use strict;
5use warnings;
5e0eea35 6
7use base 'DBIx::Class';
8d73fcd4 8
9use DBIx::Class::_Util 'quote_sub';
a9c8094b 10
11=head1 NAME
12
b24d86a1 13DBIx::Class::CDBICompat::Relationship - Emulate the Class::DBI::Relationship object returned from meta_info()
a9c8094b 14
15=head1 DESCRIPTION
16
17Emulate the Class::DBI::Relationship object returned from C<meta_info()>.
18
19=cut
20
21my %method2key = (
22 name => 'type',
23 class => 'self_class',
24 accessor => 'accessor',
25 foreign_class => 'class',
1097f5e4 26 args => 'args',
a9c8094b 27);
28
8d73fcd4 29quote_sub __PACKAGE__ . "::$_" => "\$_[0]->{$method2key{$_}}"
30 for keys %method2key;
31
a9c8094b 32sub new {
33 my($class, $args) = @_;
d4daee7b 34
a9c8094b 35 return bless $args, $class;
36}
37
a2bd3796 38=head1 FURTHER QUESTIONS?
39
40Check the list of L<additional DBIC resources|DBIx::Class/GETTING HELP/SUPPORT>.
41
42=head1 COPYRIGHT AND LICENSE
43
44This module is free software L<copyright|DBIx::Class/COPYRIGHT AND LICENSE>
45by the L<DBIx::Class (DBIC) authors|DBIx::Class/AUTHORS>. You can
46redistribute it and/or modify it under the same terms as the
47L<DBIx::Class library|DBIx::Class/COPYRIGHT AND LICENSE>.
48
49=cut
50
a9c8094b 511;