in reply to Perl CGI - Param value not refreshing
I'm facing some strange issue with Perl CGI.
Nothing really strange, just real basic pitfalls , like you've never read perlintro or coping with scoping or SYNOPSIS of CGI
And then you throw mod_perl in the mix but you haven't read CGI to mod_perl Porting. mod_perl Coding guidelines
You have a lot of reading to do so you can write
#!/usr/bin/perl -- use strict; use warnings; use CGI qw(); use CGI::Carp qw ( fatalsToBrowser ); use JSON::Parse 'parse_json'; use REST::Client; Main( @ARGV ); exit( 0 ); sub Main { my $client = REST::Client->new(); $client->setHost('http://localhost'); my $q = CGI->new(); my $adId = $q->param('adId'); print $q->header, $adId; }
|
|---|