develooper Front page | perl.riscos | Postings from October 2006

Re: CGI module

Thread Previous
From:
Derek.Moody
Date:
October 13, 2006 07:00
Subject:
Re: CGI module
Message ID:
Marcel-1.53-1013133621-0b0BxcK@half-baked-idea.co.uk
On Fri 13 Oct, Colin Foster wrote:

> Have been trying to use the CGI module but find that the statement
> $name = param('name');  and others does not work.

For what value of not working?

> The CGI package requires 5.004 and is copyrighted 1995-1998. I am 
> using it with Perl 5.8.8 and WebJames RiscOS 5.11

Using 5.8.8  CGI.pm 3.15  WebJames 0.47 and RISCOS 3.7 under raFS

No problem here, the following works as expected:

#######################

#!perl -w

use strict;
use CGI qw/:standard/;

my $name=param('name');

print header,start_html('What I got'),h1("I got $name");

print end_html;

#######################

On my setup I have to dial-up the Next slot a bit - try about 5Mb.

Still no joy?
To see if you've a naming mismatch insert this before the last line:

print p('Here is a list of all parameters and their values:');
print "<dl>\n";
if (param()){
  foreach my $entry (param){
    print "<dt>$entry</dt><dd>"
          .param($entry)
         ."</dd>\n";
  }
}
print "</dl>\n";


> Is there a more up to date CGI module available.

The latest on CPAN is 3.25 but I doubt there's anything there that would
make any difference to parameter access. When your setup runs out of steam
you'll gain a lot more by switching to a dedicated host than you will by
tweaking modules on RISCOS.

Cheerio,

-- 
>> derek.moody@clara.net


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About