This file is indexed.

/usr/share/perl5/WWW/Selenium/Util.pm is in libtest-www-selenium-perl 1.36-2.

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
package WWW::Selenium::Util;
{
  $WWW::Selenium::Util::VERSION = '1.36';
}
# ABSTRACT: Utility code to help test using Selenium

use strict;
use warnings;
use IO::Socket;
use base 'Exporter';
our @EXPORT_OK = qw(server_is_running);


sub server_is_running {
    my $host = $ENV{SRC_HOST} || shift || 'localhost';
    my $port = $ENV{SRC_PORT} || shift || 4444;

    return ($host, $port) if IO::Socket::INET->new(
        PeerAddr => $host,
        PeerPort => $port,
    );
    return;

}

1;

__END__

=pod

=head1 NAME

WWW::Selenium::Util - Utility code to help test using Selenium

=head1 VERSION

version 1.36

=head1 SYNOPSIS

WWW::Selenium::Util contains utility functions to help use Selenium
in your test scripts:

  use WWW::Selenium::Util qw/server_is_running/;
  use Test::More;

  if (server_is_running) {
      plan tests => 1;
  }
  else {
      plan skip_all => "No selenium server found!";
      exit 0;
  }

  # ... your tests ...

=head1 NAME

WWW::Selenium::Util - Utility code to help test using Selenium

=head1 FUNCTIONS

=head2 server_is_running( $host, $port )

Returns true if a Selenium server is running.  The host and port 
parameters are optional, and default to C<localhost:4444>.

Environment vars C<SRC_HOST> and C<SRC_PORT> can also be used to
determine the server to check.

=head1 AUTHORS

Written by Luke Closs <selenium@5thplane.com>

=head1 LICENSE

Copyright (c) 2007 Luke Closs <lukec@cpan.org>

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

=cut