This file is indexed.

/usr/share/perl5/Pithub/Search.pm is in libpithub-perl 0.01025-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
package Pithub::Search;
$Pithub::Search::VERSION = '0.01025';
BEGIN {
  $Pithub::Search::AUTHORITY = 'cpan:PLU';
}

# ABSTRACT: Github v3 Search API

use Moo;
use Carp qw(croak);
extends 'Pithub::Base';


sub email {
    my ( $self, %args ) = @_;
    croak 'Missing key in parameters: email' unless $args{email};
    return $self->request(
        method => 'GET',
        path   => sprintf( '/legacy/user/email/%s', delete $args{email} ),
        %args,
    );
}


sub issues {
    my ( $self, %args ) = @_;
    $self->_validate_user_repo_args( \%args );
    croak 'Missing key in parameters: state' unless $args{state};
    croak 'Missing key in parameters: keyword' unless $args{keyword};
    return $self->request(
        method => 'GET',
        path   => sprintf( '/legacy/issues/search/%s/%s/%s/%s', delete $args{user}, delete $args{repo}, delete $args{state}, delete $args{keyword} ),
        %args,
    );
}


sub repos {
    my ( $self, %args ) = @_;
    croak 'Missing key in parameters: keyword' unless $args{keyword};
    return $self->request(
        method => 'GET',
        path   => sprintf( '/legacy/repos/search/%s', delete $args{keyword} ),
        %args,
    );
}


sub users {
    my ( $self, %args ) = @_;
    croak 'Missing key in parameters: keyword' unless $args{keyword};
    return $self->request(
        method => 'GET',
        path   => sprintf( '/legacy/user/search/%s', delete $args{keyword} ),
        %args,
    );
}

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

Pithub::Search - Github v3 Search API

=head1 VERSION

version 0.01025

=head1 METHODS

=head2 email

=over

=item *

This API call is added for compatibility reasons only. There's
no guarantee that full email searches will always be available.

    GET /legacy/user/email/:email

Examples:

    my $search = Pithub::Search->new;
    my $result = $search->email(
        email => 'plu@pqpq.de',
    );

=back

=head2 issues

=over

=item *

Find issues by state and keyword.

    GET /legacy/issues/search/:owner/:repository/:state/:keyword

Examples:

    my $search = Pithub::Search->new;
    my $result = $search->issues(
        user    => 'plu',
        repo    => 'Pithub',
        state   => 'open',
        keyword => 'some keyword',
    );

=back

=head2 repos

=over

=item *

Find repositories by keyword. Note, this legacy method does not
follow the v3 pagination pattern. This method returns up to 100
results per page and pages can be fetched using the start_page
parameter.

    GET /legacy/repos/search/:keyword

Examples:

    my $search = Pithub::Search->new;
    my $result = $search->repos(
        keyword => 'github',
        params  => {
            language   => 'Perl',
            start_page => 0,
        }
    );

=back

=head2 users

=over

=item *

Find users by keyword.

    GET /legacy/user/search/:keyword

Examples:

    my $search = Pithub::Search->new;
    my $result = $search->users(
        keyword => 'plu',
    );

=back

=head1 AUTHOR

Johannes Plunien <plu@cpan.org>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Johannes Plunien.

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

=cut