> I am trying to pull remote host/addresses in an Apache2 w mod_perl > environment. Here is what I am trying without luck > > % my $conn = $r->connection() ; > % print $conn->local_host() ; > % print $conn->remote_host() ; > % print $conn->remote_ip() ; > > I get 'cant locate object method...' on my error message. Although the > Apache2::Connection pod documentation shows this to be a reasonable approach > and my Dumper() shows I get an Apache2::Connection object. > Am I missing something ?
That code should work, although I personally would replace your print statements with a <% ... %> tag instead. Do you have Apache2::Connection loaded? Typically this is done inside of a startup.pl file. See http://perl.apache.org/docs/2.0/user/handlers/server.html#Startup_File for details and an example. If that doesn't help, then provide the actual error message. Also, provide how you have Mason configured, ie the relevant sections of your http.conf. Regards, Bradley C Bailey ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users