home *** CD-ROM | disk | FTP | other *** search
/ Peanuts NeXT Software Archives / Peanuts-2.iso / Developer / webobjects / extensions / win-nt / WOPerl-lite-10e7.exe / Examples / WOPerl / DefaultApp / WOPerlDefaultApp < prev   
Encoding:
Text File  |  1996-08-09  |  1.5 KB  |  49 lines

  1. #!/LocalDeveloper/Executables/woperl --
  2. # -*-perl-*-
  3. # $Id: WOPerlDefaultApp,v 1.1 1996/07/26 05:15:12 pedja Exp $
  4. # Copyright 1996, TipTop Software.
  5. eval 'exec /LocalDeveloper/Executables/woperl $0 "$@"'
  6.     if 0;
  7.  
  8. #############################################################################
  9. # To run WOPerlDefaultApp:
  10. #
  11. # * Short form:
  12. #
  13. #     WOPerlDefaultApp WOArgs
  14. #
  15. #   where WOArgs :=  [-c] [-d DocumentRoot] [-v WebObjectsVersion]
  16. #                    [-n InstanceNumber] [-p PortNumber] [-] ApplicationName
  17. #
  18. #   (see the WebObjects documentation "Serving WebObjects" for full
  19. #    description of WOArgs).
  20. #
  21. # * Long form:
  22. #
  23. #     woperl PerlArgs WOPerlDefaultApp WOArgs
  24. #
  25. #   where PerlArgs := [-acdhnpPsSTuUvw] [-0[octal]] [-D[number/list]]
  26. #                     [-F regexp] [-i[extension]] [B<-ltdir<gt>>] [-l[octal]]
  27. #                     [-x[dir]]
  28. #
  29. #   (see the perl(1) man page for full description of PerlArgs).
  30. #############################################################################
  31.  
  32. use WOPerl;
  33.  
  34. # WOApplicationAdaptor accesses NXArgc/NXArgv directly!
  35. # &kludge_argv sets NXArgc/NXArgv to the specified argument list.
  36. &WOPerl::kludge_argv($0,@ARGV);
  37.  
  38. $pool=class('NSAutoreleasePool')->alloc->init;
  39.   $adaptor=class('WOApplicationAdaptor')->alloc->init->autorelease;
  40.   $WOApp=class('TTWOPerlApplication')->sharedInstance;
  41.  
  42.   print "Running WO app ",$WOApp->applicationName,": $0 @ARGV\n";
  43.   $adaptor->runWithApplication_($WOApp);
  44. $pool->release;
  45.  
  46. exit(0);
  47.  
  48. # EOF
  49.