perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rafiq Ismail (ADMIN)" <ra...@joshua.dreamthought.com>
Subject RE: Some wierd problem with mod_perl and Apache
Date Mon, 05 Aug 2002 18:59:43 GMT

On Mon, 5 Aug 2002, sully wrote:

> I'm just wondering if there's a better workaround than adding CGI.pm
> to the mix at this point. Anyone have any ideas?


As stated before, one over simplified way could be as follow.

	my %params = $r->method eq 'POST' ? $r->content : $r->args;


Thus, in your handler you can do:

sub handler
{
	my $r = shift;

	my %params = $r->method eq 'POST' ? $r->content : $r->args;

	my $obj= Fancy::Pants->new({params=>\%params});
	return OK if $obj->whateverFuncyRoutineYouAreWriting;

}


Method in your objecto:

        sub new ... # construtor bless etc.

	sub whateverFuncyRoutineetcetc
	{
	  my $self = shift;
	  my $params = $self->getParams; # which does a return
$self->{params}

          my $oldpass = $params->{password};
          my $newpass = $params->{newpassword};
          my $confirmpass = $params->{confirmpassword};


	....
	}

cheers,
fiq with eye strain


-- 
      I do lots of
        ___   ___
 _ __  / _ \ / _ \ _ __
| '_ \| | | | | | | '_ \
| |_) | |_| | |_| | |_) |
| .__/ \___/ \___/| .__/
|_| erl           |_|rogramming



Mime
View raw message