Options +ExecCGI AddHandler cgi-script .cgi .pl <FilesMatch \.(nsql|nes.cfg)$> order deny,allow deny from all </FilesMatch>
AddHandler perl-nes .nhtml AddHandler perl-nes .nhtm # change for NES directory installation Action perl-nes /cgi-bin/nes/dispatch.cgi <FilesMatch \.(nsql|nes.cfg)$> order deny,allow deny from all </FilesMatch>For the html/htm file add:
AddHandler perl-nes .html AddHandler perl-nes .htmWith this configuration will run the script by:
Options +ExecCGI AddHandler cgi-script .cgi .pl
{: NES 1.0 ('hello.cgi') :} <html> <head> <title>Nes Hello World</title> </head> <body> <b>{: $ var_hello :}</b> </body> </html>The file should contain nhtml in the first line, first character, the script to be executed, or nothing, and will be displayed as a html file more.
use Nes; # A Singleton object my $nes = Nes::Singleton->new('hello.nhtml'); # A variable which stores information to be displayed in html my $nes_tags = {}; $nes_tags->{'var_hello'} = 'Hello World!'; # Finally send the data to show $nes->out(%$nes_tags);