This file is indexed.

/usr/share/perl5/Class/Trait/Config.pm is in libclass-trait-perl 0.31-4.

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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
package Class::Trait::Config;

use strict;
use warnings;

use base qw(Class::Accessor::Fast);

our $VERSION = '0.31';

# we are going for a very struct-like class here to try and keep the
# syntactical noise down.

# We never intend this class to be subclassed, so the constructor is very
# simple on purpose.  you can consider this class to be effectively sealed.

sub new {
    my $class = shift;
    return bless {
        name         => "",
        sub_traits   => [],
        requirements => {},
        methods      => {},
        overloads    => {},
        conflicts    => {}
    }, $class;
}

__PACKAGE__->mk_accessors(qw(
    name sub_traits requirements methods overloads conflicts
));

# a basic clone function for moving in and out of the cache.
sub clone {
    my $self  = shift;
    my $class = ref $self;
    return bless {
        name         => $self->{name},
        sub_traits   => [ @{ $self->{sub_traits} } ],
        requirements => { %{ $self->{requirements} } },
        methods      => { %{ $self->{methods} } },
        overloads    => { %{ $self->{overloads} } },
        conflicts    => { %{ $self->{conflicts} } },
    }, $class;
}

1;

__END__

=head1 NAME

Class::Trait::Config - Trait configuration information storage package.

=head1 SYNOPSIS

This package is used internally by Class::Trait to store Trait configuration
information. It is also used by Class::Trait::Reflection to gather information
about a Trait.

=head1 DESCRIPTION

This class is a intentionally very C-struct-like. It is meant to help
encapsulate the Trait configuration information in a clean easy to access way.

This class is effectively sealed. It is not meant to be extended, only to be
used. 

=head1 METHODS

=over 4

=item B<new>

Creates a new empty Class::Trait::Config object, with fields initialized to
empty containers. 

=item B<name>

An accessor to the C<name> string field of the Class::Trait::Config object.

=item B<sub_traits>

An accessor to the C<sub_traits> array reference field of the Class::Trait::Config object.

=item B<requirements>

An accessor to the C<requirements> hash reference field
of the Class::Trait::Config object. Note, the requirements field is a hash
reference to speed requirement lookup, the values of the hash are simply
booleans.

=item B<methods>

An accessor to the C<methods> hash reference field of the Class::Trait::Config object.

=item B<overloads>

An accessor to the C<overloads> hash reference field of
the Class::Trait::Config object.

=item B<conflicts>

An accessor to the C<conflicts> hash reference field of
the Class::Trait::Config object. Note, the conflicts field is a hash reference
to speed conflict lookup, the values of the hash are simply booleans.

=item B<clone>

Provides deep copy functionality for the Class::Trait::Config object. This
will be sure to copy all sub-elements of the object, but not to attempt to
copy and subroutine references found.

=back

=head1 SEE ALSO

B<Class::Trait>, B<Class::Trait::Reflection>

=head1 AUTHOR

Stevan Little E<lt>stevan@iinteractive.comE<gt>

=head1 COPYRIGHT AND LICENSE

Copyright 2004, 2005 by Infinity Interactive, Inc.

L<http://www.iinteractive.com> 

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

=cut