Changeset 14323 for lang/perl/POE-Component-Server-JSONRPC
- Timestamp:
- 06/21/08 02:39:48 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/POE-Component-Server-JSONRPC/trunk/lib/POE/Component/Server/JSONRPC.pm
r14290 r14323 84 84 85 85 has handler => ( 86 isa => "CodeRef|Str|HashRef ",86 isa => "CodeRef|Str|HashRef|Object", 87 87 is => "rw", 88 88 ); … … 224 224 } 225 225 226 my $cb = sub { 227 if ( do { local $@; eval { $_[0]->does("JSON::RPC::Common::Message") } } ) { 228 $client->put($_[0]); 226 if ( blessed $handler ) { 227 $client->put( $call->call($handler) ) 228 } else { 229 my $cb = sub { 230 if ( do { local $@; eval { $_[0]->does("JSON::RPC::Common::Message") } } ) { 231 $client->put($_[0]); 232 } else { 233 $client->put( $msg->return_result(@_) ); 234 } 235 }; 236 237 if ( ref $handler ) { 238 $handler->( $cb, $msg, $client ); 229 239 } else { 230 $ client->put( $msg->return_result(@_));240 $kernel->post( $self->_parent, $handler, $cb, $msg, $client ); 231 241 } 232 };233 234 if ( ref $handler ) {235 $handler->( $cb, $msg, $client );236 } else {237 $kernel->post( $self->_parent, $handler, $cb, $msg, $client );238 242 } 239 243 } else {
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)