This file is indexed.

/usr/share/perl5/Socialtext/Resting/Getopt.pm is in libsocialtext-resting-utils-perl 0.21-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
package Socialtext::Resting::Getopt;
use strict;
use warnings;
use base 'Exporter';
use Socialtext::Resting::DefaultRester;
use Getopt::Long qw/:config/;
our @EXPORT_OK = qw/get_rester rester_usage/;

=head1 NAME

Socialtext::Resting::Getopt - Handle command line rester args

=head1 SYNOPSIS

  use Socialtext::Resting::Getopt qw/get_rester/;
  my $rester = get_rester();

=cut

our $VERSION = '0.01';

=head1 FUNCTIONS

=head2 get_rester

Create a new rester from command line args.

=cut

sub get_rester {
    my %opts = @_;
    Getopt::Long::Configure('pass_through');
    GetOptions(
        \%opts,
        'server|s=s',
        'workspace|w=s',
        'username|u=s',
        'password|p=s',
        'user_cookie=s',
        'rester-config|c=s',
    );
    Getopt::Long::Configure('no_pass_through');
    return Socialtext::Resting::DefaultRester->new(%opts);
}

=head2 rester_usage

Return usage text for the arguments accepted by this module.

=cut

sub rester_usage {
    my $rc_file = $Socialtext::Resting::DefaultRester::CONFIG_FILE;
    return <<EOT;
REST API Options:
 --server      Socialtext server
 --username    User to login as
 --password    User password
 --user_cookie NLW-user cookie to use (supercedes username & password)
 --workspace   Workspace to use
 --rester-config   Config file containing 'key = value'

Rester Config:
Put the above options into $rc_file like this:

  username = some_user\@foobar.com
  password = your_pass
  workspace = your_workspace
  server   = https://www.socialtext.net
EOT
}

=head1 AUTHOR

Luke Closs, C<< <luke.closs at socialtext.com> >>

=head1 LICENSE

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

=cut

1;