This file is indexed.

/usr/share/perl5/Autodia/Diagram/Object.pm is in autodia 2.14-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
################################################################
# AutoDia - Automatic Dia XML.   (C)Copyright 2001 A Trevena   #
#                                                              #
# AutoDia comes with ABSOLUTELY NO WARRANTY; see COPYING file  #
# This is free software, and you are welcome to redistribute   #
# it under certain conditions; see COPYING file for details    #
################################################################
package Autodia::Diagram::Object;

use strict;

require Exporter;
use vars qw($VERSION @ISA @EXPORT);

@ISA = qw(Exporter);


#---------------------------------------------------------------

#####################
# Constructor Methods

sub new
{
  my $class = shift;
  my $self = {};

  bless ($self, ref($class) || $class);
  $self->_initialise();

  return $self;
}

#------------------------------------------------------------------------
# Access Methods

sub set_location
{
  my $self = shift;
  my $new_x = shift || 1;
  my $new_y = shift || 1;

  if (defined $new_x )
  {
      $self->{"left_x"} = $new_x;
      $self->{"top_y"} = $new_y;
  }
  my @bottom_right_xy = split(",",$self->BottomRightPos);

  return \@bottom_right_xy;
}

sub TopLeftPos
{
    my $self = shift;
    my $return = sprintf("%.3f",$self->{"left_x"}) . "," . sprintf("%.3f",$self->{"top_y"});
    return $return;
}

sub BottomRightPos
{
    my $self = shift;


     $self->{"left_x"} ||= 1; # hack
     $self->{"width"}  ||= 1; # these aren't getting initialised for some reason
     $self->{"top_y"}  ||= 1;
     $self->{"height"} ||= 1;

    my $x = sprintf("%.3f",$self->{"width"} + $self->{"left_x"});
    my $y = sprintf("%.3f",$self->{"top_y"} + $self->{"height"});

    return "$x,$y";
}

sub Width
  {
    my $self = shift;
    return sprintf("%.3f",$self->{"width"});
  }

sub Height
  {
    my $self = shift;
    return sprintf("%.3f",$self->{"height"});
  }

sub Id
{
  my $self = shift;
  return $self->{"id"};
}

sub Set_Id
{
  my $self = shift;
  $self->{"id"} = shift;
  return 1;
}

sub Type
  {
    my $self = shift;
    my $return_val = "-";
    my $type = $self->{"type"} || 0;
    if ($type) { $return_val = $type; }
    return $return_val;
  }

sub Name
{
  my $self = shift;
  my $name = shift;
  if ($name)
    {
      $self->{"name"} = $name;
      return 1;
    }
  else
    {
     return $self->{"name"};
    }
}

sub LocalId
{
  my $self = shift;
  my $new_id = shift;
  my $return = 1;

  if (defined $new_id)
    { $self->{"local_id"} = $new_id; }
  else
    { $return = $self->{"local_id"}; }

  return $return;
}

#-----------------------------------------------------------------------------
# Internal Methods

sub _initialise
{
  my $self = shift;
  $self->{"width"}  = 1;
  $self->{"height"} = 1;
  $self->{"name"}   = "";
  $self->{"top_y"}  = 0;
  $self->{"left_x"} = 0;
  return;
}

sub _update
  {
    return 1;
  }

sub _width
  {
    my $self = shift;
    $self->{"width"} = 0.5 + (0.6 * length($self->{"name"}));
    return 1;
  }

sub _height
  {
    my $self = shift;
    $self->{"height"} = 2.5;
    return 1;
  }

sub _set_updated
  {
    my $self = shift;
    my $field = shift;

    ${$self->{"_updated"}}{$field} = 1;

    return 1;
  }

1;

###############################################################################