[Bps-public-commit] plient branch, master, updated. 0d266bd89a0f547a7026fbd018baa57d5ac2c0ee

? sunnavy sunnavy at bestpractical.com
Mon May 3 22:54:58 EDT 2010


The branch, master has been updated
       via  0d266bd89a0f547a7026fbd018baa57d5ac2c0ee (commit)
      from  2ec0038f6c50e3a1259484f0b7eb747c3b939392 (commit)

Summary of changes:
 lib/Plient.pm |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit 0d266bd89a0f547a7026fbd018baa57d5ac2c0ee
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue May 4 10:54:04 2010 +0800

    doc output_file

diff --git a/lib/Plient.pm b/lib/Plient.pm
index 5177a47..e104bf9 100644
--- a/lib/Plient.pm
+++ b/lib/Plient.pm
@@ -275,18 +275,22 @@ implemented currently.
 
 accessing $uri with the specified $method and $args.
 
-return the content server returns.
+return the content server returns unless $args->{output_file} is set,
+in which case return 1 to indicate success.
 
 $method: for HTTP(S), can be 'get', 'post', 'head', etc.
 
 $uri: e.g. http://cpan.org
 
-$args: hashref, currently, two useful items for HTTP(S):
+$args: hashref
 
+    output_file: the file path returned content from server will be written to.
+        if this option is set, plient() will return 1 if with success.
+    
     headers: hashref, this will be sent as HTTP(S) headers. e.g.
         { 'User-Agent' => 'plient/0.01' }
 
-    body: hashref, this will be sent as post data.
+    body: hashref, this will be sent as HTTP(S) post data.
         { 'title' => 'foo', body => 'bar' }
 
 =head2 plient_support( $protocol, $method, $args )

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list