api.cgi 419 B

12345678910111213141516171819202122232425
  1. #!/usr/local/cpanel/3rdparty/bin/perl
  2. #ACLS:all
  3. package Troglodyne::CGI::API;
  4. use strict;
  5. use warnings;
  6. use Cpanel::LoadModule::Custom ();
  7. use JSON::XS ();
  8. run() unless caller();
  9. sub run {
  10. # Process the args
  11. # Get back the datastruct from the called module.
  12. # Emit the JSON
  13. print "Content-type: application/json\r\n\r\n";
  14. print JSON::XS::encode_json($ret);
  15. exit;
  16. }
  17. 1;