This file is indexed.

/usr/share/perl5/XML/Smart/XPath.pm is in libxml-smart-perl 1.6.9-3.

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
#############################################################################
## Name:        XPath.pm
## Purpose:     XML::Smart::XPath - Compatibility with XPath (through XML::XPath).
## Author:      Graciliano M. P.
## Modified by:
## Created:     01/10/2003
## RCS-ID:      
## Copyright:   (c) 2003 Graciliano M. P.
## Licence:     This program is free software; you can redistribute it and/or
##              modify it under the same terms as Perl itself
#############################################################################

package XML::Smart::XPath ;

our ($VERSION , @ISA) ;
$VERSION = '0.01' ;

require Exporter ;
@ISA = qw(Exporter) ;

our @EXPORT = qw(xpath XPath xpath_pointer XPath_pointer) ;
our @EXPORT_OK = @EXPORT ;

my $load_XPath ;

use strict ;
no warnings ;

##############
# LOAD_XPATH #
##############

sub load_XPath {
  return $load_XPath if $load_XPath ;
  eval(q`use XML::XPath ;`);
  if ($@) {
    warn("Error loading module XML::XPath! Can't use XPath with XML::Smart! Please install XML::XPath.");
    $load_XPath = undef ;
  }
  else { $load_XPath = 1 ;}
  return $load_XPath ;
}

#########
# XPATH #
#########

sub XPath { &xpath } ;

sub xpath {
  my $this = shift ;
  
  load_XPath() ;

  my $xpath ;
  
  if ( $$this->{XPATH} ) { $xpath = ${$$this->{XPATH}} ;}
  
  if (!$xpath){
    $xpath = XML::XPath->new(xml => $this->data(nospace => 1 , noheader => 1)) ;  
    $$this->{XPATH} = \$xpath ;
  }
  
  if ( !@_ ) { return $xpath ;}
  return ;
}

#################
# XPATH_POINTER #
#################

sub XPath_pointer { &xpath_pointer } ;

sub xpath_pointer {
  my $this = shift ;
  
  load_XPath() ;

  my $xpath = XML::XPath->new(xml => $this->data_pointer(nospace => 1 , noheader => 1)) ;
  
  if ( !@_ ) { return $xpath ;}
  return ;
}

#######
# END #
#######

1;