M
Mr I
Hi all,
I would like so help on 2 issues
1) debugging CGI.pm cookies
How does one view the content of a cookie when it is submitted by the
client browser?
Also is there a way of simulating cookie data via the command line?
Currently I use a combination of print statments and Data:umper,
surely there must be an inbuilt method.
2) Template.pm with CGI.pm
I have recently started using CGI.pm below is a subsection of code
----
$query = new CGI;
$query->param('file').....
.....
my $ttconfig = {
# allow absolute path statments
ABSOLUTE => 1,
};
my $tt = Template->new($ttconfig);
$tt->process('./foo.tt', { centre => $query }) || die $tt->error;
-------
in foo.tt i have TT syntax like
[% centre.file %]
whenthe program is excuted I get the error
undef error - Undefined subroutine CGI::failure
at (eval 12) line 9
I am aware that I am referencing the data incorrectly in foo.tt, but I
am unable to work out the correct method:
I thought Template.pm could figure out what data type it is passed?
$query is of type CGI. Is it because it is not a builtin type
Template.pm does not know what to do?
What is the best method to pass CGI info to a template
what I'm doing now:
Investigated TT module Template:lugin::CGI
added
[% USE CGI %]
get error:
undef error - Undefined subroutine CGI::failure
at (eval 12) line 13
thank you in advance for any advice.
K
I would like so help on 2 issues
1) debugging CGI.pm cookies
How does one view the content of a cookie when it is submitted by the
client browser?
Also is there a way of simulating cookie data via the command line?
Currently I use a combination of print statments and Data:umper,
surely there must be an inbuilt method.
2) Template.pm with CGI.pm
I have recently started using CGI.pm below is a subsection of code
----
$query = new CGI;
$query->param('file').....
.....
my $ttconfig = {
# allow absolute path statments
ABSOLUTE => 1,
};
my $tt = Template->new($ttconfig);
$tt->process('./foo.tt', { centre => $query }) || die $tt->error;
-------
in foo.tt i have TT syntax like
[% centre.file %]
whenthe program is excuted I get the error
undef error - Undefined subroutine CGI::failure
at (eval 12) line 9
I am aware that I am referencing the data incorrectly in foo.tt, but I
am unable to work out the correct method:
I thought Template.pm could figure out what data type it is passed?
$query is of type CGI. Is it because it is not a builtin type
Template.pm does not know what to do?
What is the best method to pass CGI info to a template
what I'm doing now:
Investigated TT module Template:lugin::CGI
added
[% USE CGI %]
get error:
undef error - Undefined subroutine CGI::failure
at (eval 12) line 13
thank you in advance for any advice.
K