> Good morning,
> 
> im trying to set up a tools module for my modperl environment.
> My function get_vars should get all passed variables with the following
> snipplet:
> 
>  if($ENV{'REQUEST_METHOD'} eq "GET"){
>   $my_data = $ENV{'QUERY_STRING'};
>  }
>  else {
>   $data_length = $ENV{'CONTENT_LENGTH'};
>   $bytes_read = read(STDIN, $my_data, $data_length); (*)
>  }
> 
> This works great in a function of a script.
> If i put the code into a seperate module (which i use in my script), only
> the GET method works, so i think there is a problem in the (*) line.
> 
> So, my question: How do i capture the POST variables from within a module.
> 

Um, use the CGI module or a more mod_perl friendly (if such a thing
exists) module that will already do this?

Are you exporting $my_data?  You would need to show us more of your
module, and how you are accessing into it.  Are you using 'strict' and
'warnings'?  

http://danconia.org


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to