diff options
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | Changes | 8 | ||||
| -rw-r--r-- | dist.ini | 17 | ||||
| -rw-r--r-- | lib/Net/HTTP/Spore.pm | 7 | ||||
| -rw-r--r-- | lib/Net/HTTP/Spore/Meta/Method.pm | 3 | ||||
| -rw-r--r-- | t/spore-method/base.t | 1 |
6 files changed, 29 insertions, 10 deletions
@@ -4,4 +4,5 @@ /Makefile.PL *.patch -*.tar.gz
\ No newline at end of file +*.tar.gz +Net-HTTP-Spore-*
\ No newline at end of file @@ -1,3 +1,11 @@ +{{$NEXT}} + - Fix random test failure in t/spore-method/base.t related to random hash + ordering in perl 5.17.6+ (#19) + +0.05 Sun Nov 25 11:40:24 2012 + - Fix a memory leak in Net::HTTP::Spore::Meta::Method (michaelr) + - Fix meta information in the dist.ini file (dolmen) + 0.04 Tue Jul 26 11:32:00 2011 - allow XML::Simple options for Format::XML (fperrad) - stringify Net::HTTP::Response to a useful message @@ -2,8 +2,11 @@ name = Net-HTTP-Spore author = franck cuny <franck@lumberjaph.net> license = Perl_5 copyright_holder = linkfluence -copyright_year = 2010 -version = 0.04 +copyright_year = 2012 +version = 0.05 + +[@Git] +tag_format = %v [@Filter] bundle = @Basic @@ -17,12 +20,16 @@ bundle = @Basic [EOLTests] [MetaResources] -repository = git://github.com/franckcuny/net-http-spore.git -bugtracker = http://github.com/franckcuny/net-http-spore/issues -homepage = http://github.com/franckcuny/net-http-spore +repository.type = git +repository.url = git://github.com/franckcuny/net-http-spore.git +repository.web = https://github.com/franckcuny/net-http-spore +bugtracker.web = https://github.com/franckcuny/net-http-spore/issues +homepage = http://lumberjaph.net/net-http-spore/ [PodWeaver] [AutoPrereqs] [ReadmeFromPod] [CheckChangeLog] +[TestRelease] +[ConfirmRelease] [UploadToCPAN] diff --git a/lib/Net/HTTP/Spore.pm b/lib/Net/HTTP/Spore.pm index 5c4f0c7..38ba4f7 100644 --- a/lib/Net/HTTP/Spore.pm +++ b/lib/Net/HTTP/Spore.pm @@ -12,8 +12,6 @@ use Scalar::Util; use Net::HTTP::Spore::Core; -our $VERSION = 0.03; - # XXX should we let the possibility to override this super class, or add # another superclasses? @@ -153,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'); @@ -204,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 diff --git a/lib/Net/HTTP/Spore/Meta/Method.pm b/lib/Net/HTTP/Spore/Meta/Method.pm index 9f95c48..1a04eca 100644 --- a/lib/Net/HTTP/Spore/Meta/Method.pm +++ b/lib/Net/HTTP/Spore/Meta/Method.pm @@ -133,10 +133,11 @@ has documentation => ( sub wrap { my ( $class, %args ) = @_; + my $name = $args{name}; my $code = sub { my ( $self, %method_args ) = @_; - my $method = $self->meta->find_spore_method_by_name( $args{name} ); + my $method = $self->meta->find_spore_method_by_name( $name ); my $payload = ( defined $method_args{spore_payload} ) diff --git a/t/spore-method/base.t b/t/spore-method/base.t index 5f9c440..1ea5018 100644 --- a/t/spore-method/base.t +++ b/t/spore-method/base.t @@ -9,6 +9,7 @@ dies_ok { name => 'test_method', package_name => 'test::api', body => sub { 1 }, + path => '/path', ); } "missing some params"; |
