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