CGI::ExtDirect

Ext.Direct remoting interface for CGI applications
Download

CGI::ExtDirect Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Alexander Tokarev
  • Publisher web site:
  • http://search.cpan.org/~tokarev/

CGI::ExtDirect Tags


CGI::ExtDirect Description

CGI::ExtDirect is a Perl module that provides RPC::ExtDirect gateway implementation for CGI environment. It can be used wth Perl versions 5.6 and newer in about any environment; it was tested successfully with Apache, pure Perl server based on HTTP::Server::Simple and various other HTTP servers.You can change some default configuration options by passing relevant parameters like shown above. For the meaning of parameters, see RPC::ExtDirect::API documentation.Note that Ext.Direct specification requires server side implementation to return diagnostic messages only when debugging is explicitly turned on. This is why debug flag defaults to 'off' and CGI::ExtDirect returns generic error messages that do not contain any details as to where and what error has happened.SYNOPSISAPI definitionIn api.cgi: use CGI::ExtDirect; use My::ExtDirect::Published::Module::Foo; use My::ExtDirect::Published::Module::Bar; my $direct = CGI::ExtDirect->new(); print $direct->api(); # Prints full HTTP responseRouting requestsIn router.cgi: use CGI::ExtDirect; use RPC::ExtDirect::API api_path => '/extdirect_api', router_path => '/extdirect_router', poll_path => '/extdirect_events', remoting_var => 'Ext.app.REMOTING_API', polling_var => 'Ext.app.POLLING_API', namespace => 'myApp', # Defaults to empty auto_connect => 0, no_polling => 0, debug => 0; use My::ExtDirect::Published::Module::Foo; use My::ExtDirect::Published::Module::Bar; my $debug = 1; # Optional debugging flag my %headers = ( # Optional CGI headers -charset => 'iso-8859-1', -nph => 1, -cookie => $cookie, ); my $direct = CGI::ExtDirect->new({ debug => $debug }); print $direct->route(%headers); # Prints full HTTP responseProviding Event polling serviceIn poll.cgi: use CGI; use CGI::ExtDirect; use My::ExtDirect::Event::Provider1; use My::ExtDirect::Event::Provider2; my $debug = 1; my $cgi = CGI->new; # do something with $cgi but do not print headers ... my $direct = CGI::ExtDirect->new({ cgi => $cgi, debug => $debug }); print $direct->poll();Product's homepage


CGI::ExtDirect Related Software