On Jan 11, 2008, at 5:29 AM, Carl Johnstone wrote:
cookie_domain => the_host()
in the MyApp config, but when I try to start the server it gives an
error telling that I can't use the method "req" because $c is
undefined.
I'd be curious about why you wanted the cookie domain in the config
From: "Carl Johnstone" <[EMAIL PROTECTED]>
cookie_domain => the_host()
in the MyApp config, but when I try to start the server it gives an error
telling that I can't use the method "req" because $c is undefined.
I'd be curious about why you wanted the cookie domain in the config
anyway!
I
cookie_domain => the_host()
in the MyApp config, but when I try to start the server it gives an error
telling that I can't use the method "req" because $c is undefined.
I'd be curious about why you wanted the cookie domain in the config anyway!
I presume you've got a bit of code like:
$c->res
On Thursday 10 January 2008 21:15:25 Octavian Rasnita wrote:
> From: "Ash Berlin" <[EMAIL PROTECTED]>
>
> > How did you get to a function in MyApp.pm during a request
> >
> > # in MyApp.pm
> >
> > sub foobarbaz {
> >my ($c) = @_;
> > }
> >
> > # In controller code.
> > $c->foobarbaz();
> >
On Jan 10, 2008, at 3:15 PM, Octavian Rasnita wrote:
From: "Ash Berlin" <[EMAIL PROTECTED]>
How did you get to a function in MyApp.pm during a request
# in MyApp.pm
sub foobarbaz {
my ($c) = @_;
}
# In controller code.
$c->foobarbaz();
Make sense?
Not really.
I've tried (in MyApp.p
From: <[EMAIL PROTECTED]>
Sys::Hostname or a statically set config var, as there is no reference to
a request at that point (or any real way to derive the list of possible
hostnames hat could be requested). But then again, unless you "know" the
hostname that will always be requested why try to
From: "Ash Berlin" <[EMAIL PROTECTED]>
How did you get to a function in MyApp.pm during a request
# in MyApp.pm
sub foobarbaz {
my ($c) = @_;
}
# In controller code.
$c->foobarbaz();
Make sense?
Not really.
I've tried (in MyApp.pm):
sub the_host {
my ($c) = @_;
return $c->req->host
On Jan 10, 2008, at 1:54 PM, Octavian Rasnita wrote:
From: "Carl Johnstone" <[EMAIL PROTECTED]>
Both the context object and the hostname should be available to
code within MyApp.pm, but only if the code is running during a
request.
Ok, but how to get the hostname during a request in MyApp
On Jan 10, 2008, at 6:54 PM, Octavian Rasnita wrote:
From: "Carl Johnstone" <[EMAIL PROTECTED]>
Both the context object and the hostname should be available to
code within MyApp.pm, but only if the code is running during a
request.
Ok, but how to get the hostname during a request in MyApp
"Octavian Rasnita" <[EMAIL PROTECTED]> wrote on 01/10/2008 12:54:06 PM:
> From: "Carl Johnstone" <[EMAIL PROTECTED]>
> > Both the context object and the hostname should be available to code
> > within MyApp.pm, but only if the code is running during a request.
>
> Ok, but how to get the hostname d
From: "Carl Johnstone" <[EMAIL PROTECTED]>
Both the context object and the hostname should be available to code
within MyApp.pm, but only if the code is running during a request.
Ok, but how to get the hostname during a request in MyApp.pm if a $c
variable is not available?
Octavian
__
From: <[EMAIL PROTECTED]>
How would you propose handling an ASP like service that is branded (both
host whatever.companya.com ... othersuch.company9.com, and templates)
for 1 companies?
You should've a bit further down to where I wrote:
That said, there's a case for needing to know t
"Carl Johnstone" <[EMAIL PROTECTED]> wrote on 01/10/2008 09:44:30
AM:
> > from the context object, but is unavailable to MyApp.pm. cookie_domain
>
> Both the context object and the hostname should be available to code
within
> MyApp.pm, but only if the code is running during a request.
>
> In any
from the context object, but is unavailable to MyApp.pm. cookie_domain
Both the context object and the hostname should be available to code within
MyApp.pm, but only if the code is running during a request.
In any case I wouldn't point multiple domains at the same site, you're
always best o
"Octavian Rasnita" <[EMAIL PROTECTED]> wrote on 01/09/2008 02:01:02 PM:
> From: <[EMAIL PROTECTED]>
> > So if you want the cookie to be set on the client without worrying
about
> > the hostname requested don't set the domain_name or set the domain_name
to
> > the common domain for all hosts.
>
> T
From: <[EMAIL PROTECTED]>
So if you want the cookie to be set on the client without worrying about
the hostname requested don't set the domain_name or set the domain_name to
the common domain for all hosts.
Thank you very much! That was it.
I thought that if I won't set a domain name, it wont s
Ash Berlin <[EMAIL PROTECTED]> wrote on 01/09/2008 05:39:22 AM:
>
> On Jan 9, 2008, at 11:12 AM, Octavian Rasnita wrote:
>
> > From: "Ashley" <[EMAIL PROTECTED]>
> >
> >> Oh, I was too fast. Blush. You mean without the context object. :(
> >
> > Yes, that's what I want.
> > Can't the context objec
On Jan 9, 2008, at 6:16 AM, Octavian Rasnita wrote:
Is it possible to get the host name in MyApp.pm just like I can do
it in a controller using
$c->req->hostname;
I want to use the current hostname for setting the cookie in the
session, and the site could be accessed with 2 or more differ
On Jan 9, 2008, at 11:12 AM, Octavian Rasnita wrote:
From: "Ashley" <[EMAIL PROTECTED]>
Oh, I was too fast. Blush. You mean without the context object. :(
Yes, that's what I want.
Can't the context object be accessed in MyApp.pm?
Thanks.
Octavian
Currently MyApp.pm *is* the context ob
From: Oleg Pronin
> If you mean to get hostname in offline mode (off the processing request) -
the hostname is not known because there are no request.
> You can get the server's real hostname by Sys::Hostname::hostname() but
this probably won't help.
I want to use the current hostname
From: "Ashley" <[EMAIL PROTECTED]>
Oh, I was too fast. Blush. You mean without the context object. :(
Yes, that's what I want.
Can't the context object be accessed in MyApp.pm?
Thanks.
Octavian
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http
If you mean to get hostname in offline mode (off the processing request) -
the hostname is not known because there are no request.
You can get the server's real hostname by Sys::Hostname::hostname() but this
probably won't help.
2008/1/9, Octavian Rasnita <[EMAIL PROTECTED]>:
>
> Hi,
>
> Is it pos
Oh, I was too fast. Blush. You mean without the context object. :(
On Jan 8, 2008, at 11:31 PM, Octavian Rasnita wrote:
Hi,
Is it possible to get the host name in MyApp.pm just like I can do
it in a controller using
$c->req->hostname;
Thank you.
Octavian
___
Will I win this game of slapjack?
$c->request->uri->host
On Jan 8, 2008, at 11:31 PM, Octavian Rasnita wrote:
Hi,
Is it possible to get the host name in MyApp.pm just like I can do
it in a controller using
$c->req->hostname;
Thank you.
Octavian
24 matches
Mail list logo