This file is indexed.

/usr/share/perl5/KiokuDB/Backend/Serialize/JSPON/Converter.pm is in libkiokudb-perl 0.57-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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
package KiokuDB::Backend::Serialize::JSPON::Converter;
BEGIN {
  $KiokuDB::Backend::Serialize::JSPON::Converter::AUTHORITY = 'cpan:NUFFIN';
}
$KiokuDB::Backend::Serialize::JSPON::Converter::VERSION = '0.57';
use Moose::Role;
# ABSTRACT: Common functionality for JSPON expansion/collapsing

use namespace::clean -except => 'meta';

sub _jspon_fields {
    return qw(
        id
        class
        class_meta
        class_version
        root
        deleted
        tied
        ref
        data
        backend_data
    );
}

has id_field => (
    isa => "Str",
    is  => "ro",
    default => "id",
);

has class_field => (
    isa => "Str",
    is  => "ro",
    default => "__CLASS__",
);

has class_meta_field => (
    isa => "Str",
    is  => "ro",
    default => "__META__",
);

has class_version_field => (
    isa => "Str",
    is  => "ro",
    default => "__VERSION__",
);

has root_field => (
    isa => "Str",
    is  => "ro",
    default => "root",
);

has deleted_field => (
    isa => "Str",
    is  => "ro",
    default => "deleted",
);

has tied_field => (
    isa => "Str",
    is  => "ro",
    default => "tied",
);

has ref_field => (
    isa => "Str",
    is  => "ro",
    default => '$ref',
);

has data_field => (
    isa => "Str",
    is  => "ro",
    default => "data",
);

has backend_data_field => (
    isa => "Str",
    is  => "ro",
    default => "backend_data",
);

has inline_data => (
    isa => "Bool",
    is  => "ro",
    default => 0,
);

# kinda ugly, used to pass options down to expander/collapser from backend
has _jspon_params => (
    isa => "HashRef",
    is  => "ro",
    lazy_build => 1,
);

sub _build__jspon_params {
    my $self = shift;

    return {
        ( map {
            my $name = "${_}_field";
            $name => $self->$name
        } $self->_jspon_fields,
        ),
        ( inline_data => $self->inline_data ? 1 : 0 ),
    };
}

__PACKAGE__

__END__

=pod

=encoding UTF-8

=head1 NAME

KiokuDB::Backend::Serialize::JSPON::Converter - Common functionality for JSPON expansion/collapsing

=head1 VERSION

version 0.57

=head1 SYNOPSIS

    # internal

=head1 DESCRIPTION

These attributes are shared by both
L<KiokuDB::Backend::Serialize::JSPON::Converter> and
L<KiokuDB::Backend::Serialize::JSPON::Expander>.

These attributes are also available in L<KiokuDB::Backend::Serialize::JSPON>
and passed to the constructors of the expander and the collapser.

=head1 ATTRIBUTES

=over 4

=item id_field

=item class_field

=item class_meta_field

=item root_field

=item deleted_field

=item tied_field

=item data_field

=item ref_field

The various field name mappings for the L<KiokuDB::Entry> attributes.

Everything defaults to the attribute name, except C<class> and C<class_meta>
which default to C<__CLASS__> and C<__META__> for compatibility with
L<MooseX::Storage> when C<inline_data> is set, and C<ref_field> which is set to
C<$ref> according to the JSPON spec.

=item inline_data

Determines whether or not the entry data keys are escaped and the data is
stored in the same top level mapping, or inside the C<data_field> key.

=back

=head1 AUTHOR

Yuval Kogman <nothingmuch@woobling.org>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Yuval Kogman, Infinity Interactive.

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

=cut