File Coverage

blib/lib/DBIx/Class/CDBICompat/Relationship.pm
Criterion Covered Total %
statement 15 17 88.2
branch n/a
condition n/a
subroutine 5 6 83.3
pod 0 1 0.0
total 20 24 83.3


line stmt bran cond sub pod time code
1             package
2             DBIx::Class::CDBICompat::Relationship;
3              
4 2     2   591 use strict;
  2         5  
  2         48  
5 2     2   10 use warnings;
  2         6  
  2         59  
6              
7 2     2   14 use base 'DBIx::Class';
  2         7  
  2         438  
8              
9 2     2   13 use DBIx::Class::_Util 'quote_sub';
  2         4  
  2         74  
10 2     2   137 use namespace::clean;
  2         6  
  2         14  
11              
12             =head1 NAME
13              
14             DBIx::Class::CDBICompat::Relationship - Emulate the Class::DBI::Relationship object returned from meta_info()
15              
16             =head1 DESCRIPTION
17              
18             Emulate the Class::DBI::Relationship object returned from C.
19              
20             =cut
21              
22             my %method2key = (
23             name => 'type',
24             class => 'self_class',
25             accessor => 'accessor',
26             foreign_class => 'class',
27             args => 'args',
28             );
29              
30             quote_sub __PACKAGE__ . "::$_" => "\$_[0]->{$method2key{$_}}"
31             for keys %method2key;
32              
33             sub new {
34 0     0 0   my($class, $args) = @_;
35              
36 0           return bless $args, $class;
37             }
38              
39             =head1 FURTHER QUESTIONS?
40              
41             Check the list of L.
42              
43             =head1 COPYRIGHT AND LICENSE
44              
45             This module is free software L
46             by the L. You can
47             redistribute it and/or modify it under the same terms as the
48             L.
49              
50             =cut
51              
52             1;