Re: [mp2] $r->server()->server_hostname compatibility?

2003-02-19 Thread Stas Bekman
Nick Tonkin wrote:

On Thu, 20 Feb 2003, Stas Bekman wrote:



Nick Tonkin wrote:


On Thu, 20 Feb 2003, Stas Bekman wrote:




Nick Tonkin wrote:



server_hostname is not documented on the list. Anyone know the equivalent
please?


it hasn't changes from 1.0. I thought we have been through this already, just
yesterday.



We did. The list is resending mail. Or maybe the mail was trying to get
through?


weird



It's not quite the same: it's $r->get_server_name or
$r->server->server_name in mp2 versus $r->server->server_hostname in mp1.


No, it's exactly the same in mp1 and mp2: $r->server->server_hostname




Confusing. The docs mention server_name() at
http://perl.apache.org/docs/2.0/api/Apache/RequestUtil.html#METHODS


fixed. I actually prefer to get rid of the get_ part, but it indicates that 
you can't change it.


--


__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



Re: [mp2] $r->server()->server_hostname compatibility?

2003-02-19 Thread Nick Tonkin
On Thu, 20 Feb 2003, Stas Bekman wrote:

> Nick Tonkin wrote:
> >
> > On Thu, 20 Feb 2003, Stas Bekman wrote:
> >
> >
> >>Nick Tonkin wrote:
> >>
> >>>server_hostname is not documented on the list. Anyone know the equivalent
> >>>please?
> >>
> >>it hasn't changes from 1.0. I thought we have been through this already, just
> >>yesterday.
> >
> >
> > We did. The list is resending mail. Or maybe the mail was trying to get
> > through?
>
> weird
>
> > It's not quite the same: it's $r->get_server_name or
> > $r->server->server_name in mp2 versus $r->server->server_hostname in mp1.
>
> No, it's exactly the same in mp1 and mp2: $r->server->server_hostname


Confusing. The docs mention server_name() at
http://perl.apache.org/docs/2.0/api/Apache/RequestUtil.html#METHODS

>
> there is no such a thing as $r->server->server_name



> plus there is $r->get_server_name in 2.0

That's what I'm using for convenience anyway.


- nick

-- 


Nick Tonkin   {|8^)>




Re: [mp2] $r->server()->server_hostname compatibility?

2003-02-19 Thread Stas Bekman
Nick Tonkin wrote:


On Thu, 20 Feb 2003, Stas Bekman wrote:



Nick Tonkin wrote:


server_hostname is not documented on the list. Anyone know the equivalent
please?


it hasn't changes from 1.0. I thought we have been through this already, just
yesterday.



We did. The list is resending mail. Or maybe the mail was trying to get
through?


weird


It's not quite the same: it's $r->get_server_name or
$r->server->server_name in mp2 versus $r->server->server_hostname in mp1.


No, it's exactly the same in mp1 and mp2: $r->server->server_hostname

there is no such a thing as $r->server->server_name

plus there is $r->get_server_name in 2.0

__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




Re: [mp2] $r->server()->server_hostname compatibility?

2003-02-19 Thread Nick Tonkin


On Thu, 20 Feb 2003, Stas Bekman wrote:

> Nick Tonkin wrote:
> > server_hostname is not documented on the list. Anyone know the equivalent
> > please?
>
> it hasn't changes from 1.0. I thought we have been through this already, just
> yesterday.

We did. The list is resending mail. Or maybe the mail was trying to get
through?

It's not quite the same: it's $r->get_server_name or
$r->server->server_name in mp2 versus $r->server->server_hostname in mp1.

- nick

-- 


Nick Tonkin   {|8^)>




Re: [mp2] $r->server()->server_hostname compatibility?

2003-02-19 Thread Stas Bekman
Nick Tonkin wrote:

server_hostname is not documented on the list. Anyone know the equivalent
please?


it hasn't changes from 1.0. I thought we have been through this already, just 
yesterday.



__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



Re: [mp2] $r->server->server_hostname() compatibility?

2003-02-18 Thread Nick Tonkin
On Wed, 19 Feb 2003, Stas Bekman wrote:

> Nick Tonkin wrote:
> > On Wed, 19 Feb 2003, Stas Bekman wrote:
> >
> >
> >>Nick Tonkin wrote:
> >>
> >>>Does anyone know the equivalent directive for
> >>>$r->server()->server_hostname()
> >>
> >>it's right there:
> >>
> >>use Apache::Server;
> >>$r->server->server_name;
>
> oops, a typo, should be: $r->server->server_hostname

This and Apache::RequestUtil::get_server_name now seem to work jus' great.


- nick

-- 


Nick Tonkin   {|8^)>




Re: [mp2] $r->server->server_hostname() compatibility?

2003-02-18 Thread Stas Bekman
Nick Tonkin wrote:

On Wed, 19 Feb 2003, Stas Bekman wrote:



Nick Tonkin wrote:


Does anyone know the equivalent directive for
$r->server()->server_hostname()


it's right there:

use Apache::Server;
$r->server->server_name;


oops, a typo, should be: $r->server->server_hostname


Well, it doesn't work as advertised, I think.

package NPT::MyTest;

use strict;
use warnings;
use Apache::RequestRec;
use Apache::RequestUtil;
use Apache::Server;

sub handler {
my $r = shift;
warn $r->server->server_name;

return 200;
}

1;
~

[Tue Feb 18 15:08:58 2003] [error] [client 192.168.0.33] Can't locate
object method "server_name" via package "Apache::Server" at
/home/nick/perl/NPT/MyTest.pm line 14.




- nick




--


__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




Re: [mp2] $r->server->server_hostname() compatibility?

2003-02-18 Thread Nick Tonkin
On Wed, 19 Feb 2003, Stas Bekman wrote:

> Nick Tonkin wrote:
> > Does anyone know the equivalent directive for
> > $r->server()->server_hostname()
>
> it's right there:
>
> use Apache::Server;
> $r->server->server_name;

Well, it doesn't work as advertised, I think.

package NPT::MyTest;

use strict;
use warnings;
use Apache::RequestRec;
use Apache::RequestUtil;
use Apache::Server;

sub handler {
my $r = shift;
warn $r->server->server_name;

return 200;
}

1;
~

[Tue Feb 18 15:08:58 2003] [error] [client 192.168.0.33] Can't locate
object method "server_name" via package "Apache::Server" at
/home/nick/perl/NPT/MyTest.pm line 14.




- nick

-- 


Nick Tonkin   {|8^)>




Re: [mp2] $r->server->server_hostname() compatibility?

2003-02-18 Thread Stas Bekman
Nick Tonkin wrote:

Does anyone know the equivalent directive for
$r->server()->server_hostname()


it's right there:

use Apache::Server;
$r->server->server_name;

__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com