diff options
author | Olaf Alders <olaf@wundersolutions.com> | 2013-08-14 00:03:57 -0400 |
---|---|---|
committer | Olaf Alders <olaf@wundersolutions.com> | 2013-08-14 00:03:57 -0400 |
commit | 387048fac3c2f16232d5bb3b41a949b5a95a5bf5 (patch) | |
tree | 500c17fe441683446cbeffe28b12f039cec93783 | |
parent | Fixes typos. (diff) | |
download | net-http-spore-387048fac3c2f16232d5bb3b41a949b5a95a5bf5.tar.gz |
Re-wrap some documentation.
-rw-r--r-- | lib/Net/HTTP/Spore.pm | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/lib/Net/HTTP/Spore.pm b/lib/Net/HTTP/Spore.pm index 0802f24..e8c6c28 100644 --- a/lib/Net/HTTP/Spore.pm +++ b/lib/Net/HTTP/Spore.pm @@ -172,19 +172,24 @@ sub _add_methods { This module is an implementation of the SPORE specification. -To use this client, you need to use or to write a SPORE specification of an API. -A description of the SPORE specification format is available at +To use this client, you need to use or to write a SPORE specification of an +API. A description of the SPORE specification format is available at L<http://github.com/SPORE/specifications/blob/master/spore_description.pod> -Some specifications for well-known services are available L<http://github.com/SPORE/api-description>. +Some specifications for well-known services are available +L<http://github.com/SPORE/api-description>. =head2 CLIENT CREATION -First you need to create a client. This can be done using two methods, B<new_from_spec> and B<new_from_string>. The client will read the specification file to create the appropriate methods to interact with the API. +First you need to create a client. This can be done using two methods, +B<new_from_spec> and B<new_from_string>. The client will read the specification +file to create the appropriate methods to interact with the API. =head2 MIDDLEWARES -It's possible to activate some middlewares to extend the usage of the client. If you're using an API that discuss in JSON, you can enable the middleware L<Net::HTTP::Spore::Middleware::JSON>. +It's possible to activate some middlewares to extend the usage of the client. +If you're using an API that discuss in JSON, you can enable the middleware +L<Net::HTTP::Spore::Middleware::JSON>. $client->enable('Format::JSON'); @@ -202,9 +207,9 @@ For very simple middlewares, you can simply pass in an anonymous function =item new_from_spec($specification_file, %args) -Create and return a L<Net::HTTP::Spore::Core> object, with methods -generated from the specification file. The specification file can -either be a file on disk or a remote URL. +Create and return a L<Net::HTTP::Spore::Core> object, with methods generated +from the specification file. The specification file can either be a file on +disk or a remote URL. =item new_from_string($specification_string, %args) @@ -215,15 +220,19 @@ generated from a JSON specification string. =head2 TRACING -L<Net::HTTP::Spore> provides a way to trace what's going on when doing a request. +L<Net::HTTP::Spore> provides a way to trace what's going on when doing a +request. =head3 Enabling Trace -You can enable tracing using the environment variable B<SPORE_TRACE>. You can also enable tracing at construct time by adding B<trace =E<gt> 1> when calling B<new_from_spec>. +You can enable tracing using the environment variable B<SPORE_TRACE>. You can +also enable tracing at construct time by adding B<trace =E<gt> 1> when calling +B<new_from_spec>. =head3 Trace Output -By default output will be directed to B<STDERR>. You can specify another default output: +By default output will be directed to B<STDERR>. You can specify another +default output: SPORE_TRACE=1=log.txt |