Andrew V. Makarow > CGI-Bus-0.62 > CGI::Bus::psp

Download:
CGI-Bus-0.62.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Source  

NAME ^

CGI::Bus::psp - Perl Script Processor CGI::Bus subobject

SYNOPSIS ^

 use CGI::Bus;
 $s =CGI::Bus->new();
 $s->userauthopt;
 $s->psp->evalf(filename);

 Or directly in mixed CGI/HTML page:

 #!perl -w
 use vars qw($s);
 $s =do("config.pl");
 $s->userauthopt;
 $s->psp->evalf($0)
 __END__
 <!DOCTYPE html
 ....

DESCRIPTION ^

Why? - It is very simple.

This module is a very simple and small HTML/Perl Script Processor CGI::Bus subobject. Formatted like ASP HTML file is converted to Perl subroutine and evaluated. HTML is converted to series of print calls. <% perl expr %> tags are converted to print(perl expr). <SCRIPT > tags are considered as Perl code. Script language attribute is observed.

See CGI::Bus::Base for inherited slots and methods.

SLOTS ^

None

METHODS ^

eval (?-opt, perl text, ? filename||[filename, base],...) -> HTML page printed

Evaluate Perl text. 'e' option is to produce embeddable HTML without headers. Evaluation context is CGI::Bus::evalsub(application object, options string, filename,...)

evalf (?-opt, filename||[filename, base],...) -> HTML page printed

Evaluate HTML/Perl script file. Uses parse and eval.

parse (?-opt, html/perl text, ?filename||[filename, base],...) -> Perl text

Parse HTML/Perl script file to Perl text. 'e' option is to produce embeddable HTML without headers.

VERSION ^

02/04/2003

New:

[filename, base] filename syntax may now be used to generate '<base href...>' tag

16/09/2002

Changed:

parse omits text given before m/<(!DOCTYPE|html|head)/i, so mixed CGI/HTML page files may be parsed. Synopsis changed to reflect this feature.

15/10/2001 - 08/11/2001

New:

Implemented and Documented.

ToDo:

Perl code caching?

AUTHOR ^

Andrew V Makarow <makarow at mail.com>