/usr/share/perl5/DBIx/Class/ResultSourceProxy.pm is in libdbix-class-perl 0.08250-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | package # hide from PAUSE
DBIx::Class::ResultSourceProxy;
use strict;
use warnings;
use base qw/DBIx::Class/;
use Scalar::Util qw/blessed/;
use Sub::Name qw/subname/;
use namespace::clean;
__PACKAGE__->mk_group_accessors('inherited_ro_instance' => 'source_name');
sub get_inherited_ro_instance { shift->get_inherited(@_) }
sub set_inherited_ro_instance {
my $self = shift;
$self->throw_exception ("Cannot set @{[shift]} on an instance")
if blessed $self;
$self->set_inherited(@_);
}
sub add_columns {
my ($class, @cols) = @_;
my $source = $class->result_source_instance;
$source->add_columns(@cols);
foreach my $c (grep { !ref } @cols) {
# If this is an augment definition get the real colname.
$c =~ s/^\+//;
$class->register_column($c => $source->column_info($c));
}
}
sub add_column { shift->add_columns(@_) }
sub add_relationship {
my ($class, $rel, @rest) = @_;
my $source = $class->result_source_instance;
$source->add_relationship($rel => @rest);
$class->register_relationship($rel => $source->relationship_info($rel));
}
# legacy resultset_class accessor, seems to be used by cdbi only
sub iterator_class { shift->result_source_instance->resultset_class(@_) }
for my $method_to_proxy (qw/
source_info
result_class
resultset_class
resultset_attributes
columns
has_column
remove_column
remove_columns
column_info
columns_info
column_info_from_storage
set_primary_key
primary_columns
_pri_cols
sequence
add_unique_constraint
add_unique_constraints
unique_constraints
unique_constraint_names
unique_constraint_columns
relationships
relationship_info
has_relationship
/) {
no strict qw/refs/;
*{__PACKAGE__."::$method_to_proxy"} = subname $method_to_proxy => sub {
shift->result_source_instance->$method_to_proxy (@_);
};
}
1;
|