| 1 | package DBIx::Class::Helper::Row::RelationshipDWIM; | ||
| 2 | 57 | $DBIx::Class::Helper::Row::RelationshipDWIM::VERSION = '2.037000'; | |
| 3 | # ABSTRACT: Type less for your relationships! | ||
| 4 | |||
| 5 | 57 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 57 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 57 | ▶ | use parent 'DBIx::Class::Row'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 0 | ▶ | sub default_result_namespace { |
|
Subroutine
default_result_namespace: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 11 | 0 | die 'you forgot to set your default_result_namespace' | |
| 12 | } | ||
| 13 | |||
| 14 | 57 | ▶ | sub belongs_to { |
|
Subroutine
belongs_to: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 15 | 57 | my ( $self, @args ) = @_; | |
| 16 | |||
| 17 | 57 | $args[1] =~ s/^::/$self->default_result_namespace . '::'/e; | |
| 18 | |||
| 19 | 57 | $self->next::method(@args); | |
| 20 | } | ||
| 21 | |||
| 22 | 57 | ▶ | sub has_many { |
|
Subroutine
has_many: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 23 | 57 | my ( $self, @args ) = @_; | |
| 24 | |||
| 25 | 57 | $args[1] =~ s/^::/$self->default_result_namespace . '::'/e; | |
| 26 | |||
| 27 | 57 | $self->next::method(@args); | |
| 28 | } | ||
| 29 | |||
| 30 | 57 | ▶ | sub might_have { |
|
Subroutine
might_have: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 31 | 57 | my ( $self, @args ) = @_; | |
| 32 | |||
| 33 | 57 | $args[1] =~ s/^::/$self->default_result_namespace . '::'/e; | |
| 34 | |||
| 35 | 57 | $self->next::method(@args); | |
| 36 | } | ||
| 37 | |||
| 38 | 57 | ▶ | sub has_one { |
|
Subroutine
has_one: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 39 | 57 | my ( $self, @args ) = @_; | |
| 40 | |||
| 41 | 57 | $args[1] =~ s/^::/$self->default_result_namespace . '::'/e; | |
| 42 | |||
| 43 | 57 | $self->next::method(@args); | |
| 44 | } | ||
| 45 | |||
| 46 | 57 | 1; | |
| 47 | |||
| 48 | __END__ | ||