Optiperl is optimized to develop perl scripts for CGI use (although many tools exist solely for console scripts).

 

CGI scripts are programs that are used for web sites. Perl is more often used to create CGI scripts, and OptiPerl is made to develop them easier.

 

All the rules that apply to create a perl script apply for cgi scripts in perl. CGI scripts however most follow some extra rules, to work on web servers. These rules are not complicated and OptiPerl helps you know that you have followed all rules. In some cases it even tells you what rules you have broken.

 

For more information on creating CGI scripts, see the Tutorial section.

 

You can run CGI scripts the following ways, by having the script open in the editor:

 

  • In OptiPerl's browser, by selecting Run / Run in browser.
  • In an external browser, from Run / Run in external browser.
  • In a secondary browser, if you have setup one in Options / Environment from Run / Run in secondary browser.

 

In many circumstances, CGI scripts are not run directly, but indirectly from a html page. Usually pressing a submit button runs the script, and the next page loaded in the browser is the script's output.

 

For these cases you need to have enabled the option "Run with server". Read more about Run with server for how this is done.

 

Usually you open the html page in optiperl's editor and run with one of the methods listed above. After the page has loaded, you press it's submit button (or whatever invokes the script) and view the result of the script you are testing.

 

If you are getting error messages, unexpected result etc., you must read about the importance of the "Run with server" option first.

 

icon_exclaim This section is about running local CGI scripts.

 

  • For console scripts read the next section
  • For running scripts on remote servers, see the section "Running remote files".

 

icon_idea Sometimes you might want to run a CGI script that is supposed to get run from an html page, directly, emulating the input from the html page. Read more about the "Query editor".

 

 

Top  Previous  Next