This file is indexed.

/usr/share/perl5/AAT/Object.pm is in octopussy 1.0.6-0ubuntu1.

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
# $HeadURL$
# $Revision: 354 $
# $Date: 2010-05-20 17:20:14 +0100 (Thu, 20 May 2010) $
# $Author: sebthebert $

=head1 NAME

AAT::Object - AAT Object module

=cut

package AAT::Object;

use strict;
use warnings;

use AAT::Application;
use AAT::DB;
use AAT::XML;

=head1 FUNCTIONS

=head2 Configuration($object)

Returns Object configuration

=cut

sub Configuration
{
  my $object = shift;

  my $dir  = AAT::Application::Directory('AAT', 'objects');
  my $conf = AAT::XML::Read("$dir${object}.xml");

  return ($conf);
}

=head2 Data($appli, $object)

Returns Object data

=cut

sub Data
{
  my ($appli, $object) = @_;
  my ($conf_list, $list) = (undef, undef);

  my $conf = Configuration($object);
  if ($conf->{backend} eq 'XML')
  {
    $conf_list = AAT::XML::Read($conf->{source});
    $object    = lc $object;
    $list      = $conf_list->{$object};
  }
  elsif ($conf->{backend} eq 'DB')
  {
    my @data = AAT::DB::Query($appli, "SELECT * FROM $conf->{source}");
    $list = \@data;
  }

  return ($list);
}

1;

=head1 AUTHOR

Sebastien Thebert <octo.devel@gmail.com>

=cut