Created
July 11, 2009 05:16
-
-
Save arodland/145084 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package JSONTest::Controller::JSON; | |
use strict; | |
use warnings; | |
use base 'Catalyst::Controller'; | |
sub echo : JSONRPCPath('/echo') { | |
my ($self, $c, @args) = @_; | |
$c->stash->{jsonrpc} = join ', ', @args; | |
} | |
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package JSONTest; | |
use strict; | |
use warnings; | |
use Catalyst::Runtime '5.70'; | |
use parent qw/Catalyst/; | |
use Catalyst qw/-Debug | |
ConfigLoader | |
Static::Simple | |
Server | |
Server::JSONRPC | |
/; | |
our $VERSION = '0.01'; | |
__PACKAGE__->config( name => 'JSONTest', | |
jsonrpc => { | |
path => qr!^(/?)jsonrpc(/|$)!, # This is the "entrypoint" URL. | |
}, | |
); | |
__PACKAGE__->setup(); | |
1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment