summary refs log tree commit diff
diff options
context:
space:
mode:
authorOlaf Alders <olaf@wundersolutions.com>2011-02-09 10:22:50 -0800
committerAsh Berlin <ash_github@firemirror.com>2013-04-18 13:56:57 +0100
commite5eeb64e7302583c1d1bd9a60a0d68d768be4731 (patch)
tree731c9768aea690cb5f6572dbf3e3770eae9f56e8
parentFix random test failure in perl v5.17.6. Closes #19 (diff)
downloadnet-http-spore-e5eeb64e7302583c1d1bd9a60a0d68d768be4731.tar.gz
Clarifies that new_from_string expects a string in JSON format.
-rw-r--r--lib/Net/HTTP/Spore.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Net/HTTP/Spore.pm b/lib/Net/HTTP/Spore.pm
index 6b5a87e..38ba4f7 100644
--- a/lib/Net/HTTP/Spore.pm
+++ b/lib/Net/HTTP/Spore.pm
@@ -151,6 +151,9 @@ sub _add_methods {
 
     my $client = Net::HTTP::Spore->new_from_spec('twitter.json');
 
+    # from JSON specification string
+    my $client = Net::HTTP::Spore->new_from_string($json);
+
     # for identica
     my $client = Net::HTTP::Spore->new_from_spec('twitter.json', base_url => 'http://identi.ca/com/api');
 
@@ -202,7 +205,7 @@ either be a file on disk or a remote URL.
 =item new_from_string($specification_string, %args)
 
 Create and return a L<Net::HTTP::Spore::Core> object, with methods
-generated from the specification string.
+generated from a JSON specification string.
 
 =back