This file is indexed.

/usr/share/perl5/DBIx/Class/Schema/Loader/DBObject/Informix.pm is in libdbix-class-schema-loader-perl 0.07045-1.

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
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
package DBIx::Class::Schema::Loader::DBObject::Informix;

use strict;
use warnings;
use base 'DBIx::Class::Schema::Loader::DBObject';
use mro 'c3';
use namespace::clean;

=head1 NAME

DBIx::Class::Schema::Loader::DBObject::Informix - Class for Database Objects for
Informix Such as Tables and Views in L<DBIx::Class::Schema::Loader>

=head1 DESCRIPTION

This is a subclass of L<DBIx::Class::Schema::Loader::DBObject> that adds
support for fully qualified objects in Informix including both L</database>
and L<schema|DBIx::Class::Schema::Loader::DBObject/schema> of the form:

    database:owner.object_name

=head1 METHODS

=head2 database

The database name this object belongs to.

Returns undef if
L<ignore_schema|DBIx::Class::Schema::Loader::DBObject/ignore_schema> is set.

=cut

__PACKAGE__->mk_group_accessors(simple => qw/
    _database
/);

sub new {
    my $class = shift;

    my $self = $class->next::method(@_);

    $self->{_database} = delete $self->{database};

    return $self;
}

sub database {
    my $self = shift;

    return $self->_database(@_) unless $self->ignore_schema;

    return undef;
}

=head1 sql_name

Returns the properly quoted full identifier with L</database>,
L<schema|DBIx::Class::Schema::Loader::DBObject/schema> and
L<name|DBIx::Class::Schema::Loader::DBObject/name>.

=cut

sub sql_name {
    my $self = shift;

    my $name_sep = $self->loader->name_sep;

    if ($self->database) {
        return $self->_quote($self->database)
            . ':'
            . $self->_quote($self->schema)
            . $name_sep
            . $self->_quote($self->name);
    }

    return $self->next::method(@_);
}

sub dbic_name {
    my $self = shift;

    my $name_sep = $self->loader->name_sep;

    if ($self->loader->qualify_objects && $self->_database) {
        if ($self->_database =~ /\W/
            || $self->_schema =~ /\W/ || $self->name =~ /\W/) {

            return \ $self->sql_name;
        }

        return $self->_database . ':' . $self->_schema . $name_sep . $self->name;
    }

    return $self->next::method(@_);
}

=head1 SEE ALSO

L<DBIx::Class::Schema::Loader::Table::Informix>,
L<DBIx::Class::Schema::Loader::DBObject>,
L<DBIx::Class::Schema::Loader::Table>, L<DBIx::Class::Schema::Loader>,
L<DBIx::Class::Schema::Loader::Base>

=head1 AUTHORS

See L<DBIx::Class::Schema::Loader/AUTHORS>.

=head1 LICENSE

This library is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.

=cut

1;
# vim:et sts=4 sw=4 tw=0: