Skip to content

Commit

Permalink
New synopsis as suggested by "Sean M. Burke" <sburke@cpan.org>
Browse files Browse the repository at this point in the history
  • Loading branch information
gisle committed Aug 28, 2001
1 parent e8b2578 commit ef5588c
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions lib/LWP/UserAgent.pm
@@ -1,4 +1,4 @@
# $Id: UserAgent.pm,v 1.92 2001/08/28 04:37:52 gisle Exp $
# $Id: UserAgent.pm,v 1.93 2001/08/28 04:53:53 gisle Exp $

package LWP::UserAgent;
use strict;
Expand All @@ -10,13 +10,17 @@ LWP::UserAgent - A WWW UserAgent class
=head1 SYNOPSIS
require LWP::UserAgent;
$ua = LWP::UserAgent->new(env_proxy => 1,
keep_alive => 1,
timeout => 30,
);
my $ua = LWP::UserAgent->new(env_proxy => 1,
keep_alive => 1,
timeout => 30,
);
$request = HTTP::Request->new('GET', 'file://localhost/etc/motd');
$response = $ua->get('http://search.cpan.org/');
# or:
$request = HTTP::Request->new('GET', 'http://search.cpan.org/');
# and then one of these:
$response = $ua->request($request); # or
$response = $ua->request($request, '/tmp/sss'); # or
$response = $ua->request($request, \&callback, 4096);
Expand Down Expand Up @@ -95,7 +99,7 @@ use vars qw(@ISA $VERSION);

require LWP::MemberMixin;
@ISA = qw(LWP::MemberMixin);
$VERSION = sprintf("%d.%02d", q$Revision: 1.92 $ =~ /(\d+)\.(\d+)/);
$VERSION = sprintf("%d.%02d", q$Revision: 1.93 $ =~ /(\d+)\.(\d+)/);

use HTTP::Request ();
use HTTP::Response ();
Expand Down

0 comments on commit ef5588c

Please sign in to comment.