Net::Async::SPORE::Loader - loads SPORE API definitions
Version 0.001
my $api = Net::Async::SPORE::Loader->new_from_file( 'sample.json', transport => 'Net::Async::HTTP', class => 'Sample::API', ); $api->some_request(x => 123, y => 456)->get;
This is the API loader class. It'll read in definitions and create classes in memory.
Instantiate a new API object from the given file.
Instantiates an API object from a definition provided as a hashref.
my $api = Net::Async::SPORE::Loader->new( { ... }, transport => 'Net::Async::HTTP', class => 'Sample::API', ); $api->some_request(x => 123, y => 456)->get;
You're welcome to use these, but you probably don't need them.
Applies the API methods to the target class.
Helper function for adding a method to the given class.
inject_method($target_class, $method_name, $code);
Will raise an exception if the method is already there.
Returns an autogenerated class name.
Tom Molesworth <cpan@perlsite.co.uk>
Copyright Tom Molesworth 2012-2014. Licensed under the same terms as Perl itself.
To install Net::Async::SPORE, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Async::SPORE
CPAN shell
perl -MCPAN -e shell install Net::Async::SPORE
For more information on module installation, please visit the detailed CPAN module installation guide.