From e5eeb64e7302583c1d1bd9a60a0d68d768be4731 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Wed, 9 Feb 2011 10:22:50 -0800 Subject: [PATCH] Clarifies that new_from_string expects a string in JSON format. --- lib/Net/HTTP/Spore.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 object, with methods -generated from the specification string. +generated from a JSON specification string. =back