CGI-JSONRPC
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Apache2/JSONRPC/Session.pm view on Meta::CPAN
use strict;
use Apache2::JSONRPC;
use CGI::JSONRPC::Dispatcher::Session;
use base qw(Apache2::JSONRPC);
1;
sub new {
my ($class,%args) = @_;
%args = __PACKAGE__->init_session(%args);
return bless { dispatcher => $class->default_dispatcher, %args }, $class;
}
sub _generate_sid {
my ($class,$r) = @_;
# ok this makes me feel dirty but it's either use the id generate from
# CGI::Session, roll our own or don't depend on the POST data not getting
# messed with. Personally I feel safer using the CGI::Session id generator
# this "borrowed" from CGI::Session::ID::md5 as a middle ground position
lib/CGI/JSONRPC/Base.pm view on Meta::CPAN
use JSON::Syck;
use JSON::Syck qw(Dump Load);
(our $JAVASCRIPT = __FILE__) =~ s{\.pm$}{.js};
1;
sub new {
my($class, %args) = @_;
return bless { dispatcher => $class->default_dispatcher, %args }, $class;
}
sub default_dispatcher {
'CGI::JSONRPC::Dispatcher'
}
sub run_json_request {
my($self, $json) = @_;
my $data = (JSON::Syck::Load($json))[0];
lib/CGI/JSONRPC/Session.pm view on Meta::CPAN
use CGI::JSONRPC;
use CGI::JSONRPC::Dispatcher::Session;
use base qw(CGI::JSONRPC);
1;
sub new {
my($class,%args) = @_;
%args = __PACKAGE__->init_session(%args);
return bless { dispatcher => $class->default_dispatcher, %args }, $class;
}
sub cgi_session_dsn {
my $class = shift;
return "driver:file;serializer:yaml";
}
# should set the args with a session arg
sub init_session {
my ($class,%args) = @_;
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.836 second using v1.00-cache-2.02-grep-82fe00e-cpan-a086c87fca4 )