/usr/share/perl5/WWW/OpenSearch/Agent.pm is in libwww-opensearch-perl 0.17-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 | package WWW::OpenSearch::Agent;
use strict;
use warnings;
use base qw( LWP::UserAgent );
use WWW::OpenSearch;
use WWW::OpenSearch::Response;
=head1 NAME
WWW::OpenSearch::Agent - An agent for doing OpenSearch requests
=head1 SYNOPSIS
=head1 DESCRIPTION
=head1 CONSTRUCTOR
=head2 new( [%options] )
=head1 METHODS
=head2 request( $request | $url, \%params )
=head2 search( )
An alias for request()
=head1 AUTHOR
=over 4
=item * Brian Cassidy E<lt>bricas@cpan.orgE<gt>
=back
=head1 COPYRIGHT AND LICENSE
Copyright 2005-2013 by Tatsuhiko Miyagawa and Brian Cassidy
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut
sub new {
my ( $class, @rest ) = @_;
return $class->SUPER::new(
agent => join( '/', __PACKAGE__, $WWW::OpenSearch::VERSION ),
@rest,
);
}
*search = \&request;
sub request {
my $self = shift;
my $request = shift;
my $response = $self->SUPER::request( $request, @_ );
# allow regular HTTP::Requests to flow through
return $response unless $request->isa( 'WWW::OpenSearch::Request' );
return WWW::OpenSearch::Response->new( $response );
}
1;
|