This file is indexed.

/usr/share/perl5/Excel/Template/Container.pm is in libexcel-template-perl 0.34-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
package Excel::Template::Container;

use strict;

BEGIN {
    use vars qw(@ISA);
    @ISA = qw(Excel::Template::Base);

    use Excel::Template::Base;
}

# Containers are objects that can contain arbitrary elements, such as
# PageDefs or Loops.

sub new
{
    my $class = shift;
    my $self = $class->SUPER::new(@_);

    $self->{ELEMENTS} = []
        unless exists $self->{ELEMENTS} &&
            ref $self->{ELEMENTS} eq 'ARRAY';

    return $self;
}

# Removed as unused code
#sub _do_page
#{
#    my $self = shift;
#    my ($method, $context) = @_;
#
#    for my $e (@{$self->{ELEMENTS}})
#    {
#        $e->enter_scope($context);
#        $e->$method($context);
#        $e->exit_scope($context, 1);
#    }
#
#    return 1;
#}
#
#sub begin_page { _do_page 'begin_page', @_ }
#sub end_page   { _do_page 'end_page', @_   }

sub iterate_over_children
{
    my $self = shift;
    my ($context) = @_;

    my $continue = 1;

    for my $e (
        @{$self->{ELEMENTS}})
    {
        $e->enter_scope($context);

        my $rc = $e->render($context);
        $continue = $rc if $continue;

        $e->exit_scope($context);
    }

    return $continue;
}

sub render { $_[0]->iterate_over_children($_[1]) }
#{
#    my $self = shift;
#    my ($context) = @_;
#
#    return $self->iterate_over_children($context);
#}

# Removed as unused code
#sub max_of
#{
#    my $self = shift;
#    my ($context, $attr) = @_;
#
#    my $max = $context->get($self, $attr);
#
#    ELEMENT:
#    foreach my $e (@{$self->{ELEMENTS}})
#    {
#        $e->enter_scope($context);
#
#        my $v = $e->isa('CONTAINER')
#            ? $e->max_of($context, $attr)
#            : $e->calculate($context, $attr);
#
#        $max = $v if $max < $v;
#
#        $e->exit_scope($context, 1);
#    }
#
#    return $max;
#}
#
#sub total_of
#{
#    my $self = shift;
#    my ($context, $attr) = @_;
#
#    my $total = 0;
#
#    ELEMENT:
#    foreach my $e (@{$self->{ELEMENTS}})
#    {
#        $e->enter_scope($context);
#
#        $total += $e->isa('CONTAINER')
#            ? $e->total_of($context, $attr)
#            : $e->calculate($context, $attr);
#
#        $e->exit_scope($context, 1);
#    }
#
#    return $total;
#}

1;
__END__

=head1 NAME

Excel::Template::Container - Excel::Template::Container

=head1 PURPOSE

=head1 NODE NAME

=head1 INHERITANCE

=head1 ATTRIBUTES

=head1 CHILDREN

=head1 AFFECTS

=head1 DEPENDENCIES

=head1 USAGE

=head1 AUTHOR

Rob Kinyon (rob.kinyon@gmail.com)

=head1 SEE ALSO

=cut