I'm getting wrong uri_for

View: New views
10 Messages — Rating Filter:   Alert me  

I'm getting wrong uri_for

by Oleg Pronin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello. I upgraded to Catalyst 5.8 (5.80013) and i've got problem with uri_for.

It warns
Explicit blessing to '' (assuming package main) at
/usr/local/lib/perl5/site_perl/5.10.1/Catalyst.pm line 1281.

Becase $c->req->base is empty.

I'm not using custom Request object.

Any idea what is the reason?

_______________________________________________
List: Catalyst@...
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@.../
Dev site: http://dev.catalyst.perl.org/

Re: I'm getting wrong uri_for

by Tomas Doran :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Oleg Pronin wrote:

> Hello. I upgraded to Catalyst 5.8 (5.80013) and i've got problem with uri_for.
>
> It warns
> Explicit blessing to '' (assuming package main) at
> /usr/local/lib/perl5/site_perl/5.10.1/Catalyst.pm line 1281.
>
> Becase $c->req->base is empty.
>
> I'm not using custom Request object.
>
> Any idea what is the reason?

I'm guessing that this could have something to do with the environment
variables supplied by your web server etc..

Could you shed some light on the platform / environment you're deploying
in, and also try printing out Dumper(\%ENV) and/or $c->engine->env..

Do you have this issue with the development server, or only when running
in production? (As the former points to something in your application,
whereas the latter points to something to do with your combination of
web server / platform etc)

Cheers
t0m


_______________________________________________
List: Catalyst@...
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@.../
Dev site: http://dev.catalyst.perl.org/

Re: I'm getting wrong uri_for

by J. Shirley :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Oct 12, 2009 at 10:19 AM, Oleg Pronin <syber.rus@...> wrote:
Hello. I upgraded to Catalyst 5.8 (5.80013) and i've got problem with uri_for.

It warns
Explicit blessing to '' (assuming package main) at
/usr/local/lib/perl5/site_perl/5.10.1/Catalyst.pm line 1281.

Becase $c->req->base is empty.

I'm not using custom Request object.

Any idea what is the reason?


Is this happening with the development server, or how is your app deployed?

Is it on all requests, regardless of action?

-J

_______________________________________________
List: Catalyst@...
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@.../
Dev site: http://dev.catalyst.perl.org/

Re: I'm getting wrong uri_for

by Oleg Pronin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Holy shit! i'm an asshole. That template was rendered in offline
script :-) Strange... how did that work on Catalyst 5.7 ?    :-)))))

2009/10/12 Tomas Doran <bobtfish@...>:

> Oleg Pronin wrote:
>>
>> Hello. I upgraded to Catalyst 5.8 (5.80013) and i've got problem with
>> uri_for.
>>
>> It warns
>> Explicit blessing to '' (assuming package main) at
>> /usr/local/lib/perl5/site_perl/5.10.1/Catalyst.pm line 1281.
>>
>> Becase $c->req->base is empty.
>>
>> I'm not using custom Request object.
>>
>> Any idea what is the reason?
>
> I'm guessing that this could have something to do with the environment
> variables supplied by your web server etc..
>
> Could you shed some light on the platform / environment you're deploying in,
> and also try printing out Dumper(\%ENV) and/or $c->engine->env..
>
> Do you have this issue with the development server, or only when running in
> production? (As the former points to something in your application, whereas
> the latter points to something to do with your combination of web server /
> platform etc)
>
> Cheers
> t0m
>
>
> _______________________________________________
> List: Catalyst@...
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@.../
> Dev site: http://dev.catalyst.perl.org/
>

_______________________________________________
List: Catalyst@...
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@.../
Dev site: http://dev.catalyst.perl.org/

Re: I'm getting wrong uri_for

by Tomas Doran :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Oleg Pronin wrote:
> Holy shit! i'm an asshole. That template was rendered in offline
> script :-) Strange... how did that work on Catalyst 5.7 ?    :-)))))

Huh?

Cheers
t0m

_______________________________________________
List: Catalyst@...
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@.../
Dev site: http://dev.catalyst.perl.org/

Re: I'm getting wrong uri_for

by Oleg Pronin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

sorry for disturbing you guys, that was fully my issue :-)

2009/10/12 Tomas Doran <bobtfish@...>:

> Oleg Pronin wrote:
>>
>> Holy shit! i'm an asshole. That template was rendered in offline
>> script :-) Strange... how did that work on Catalyst 5.7 ?    :-)))))
>
> Huh?
>
> Cheers
> t0m
>
> _______________________________________________
> List: Catalyst@...
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@.../
> Dev site: http://dev.catalyst.perl.org/
>

_______________________________________________
List: Catalyst@...
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@.../
Dev site: http://dev.catalyst.perl.org/

Re: I'm getting wrong uri_for

by J. Shirley :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Oct 12, 2009 at 10:39 AM, Oleg Pronin <syber.rus@...> wrote:
sorry for disturbing you guys, that was fully my issue :-)

2009/10/12 Tomas Doran <bobtfish@...>:
> Oleg Pronin wrote:
>>
>> Holy shit! i'm an asshole. That template was rendered in offline
>> script :-) Strange... how did that work on Catalyst 5.7 ?    :-)))))
>

The way in which you acknowledged it made up for the disturbance.

Cheers.

_______________________________________________
List: Catalyst@...
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@.../
Dev site: http://dev.catalyst.perl.org/

Re: I'm getting wrong uri_for

by Joel Bernstein :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/10/12 Oleg Pronin <syber.rus@...>:
> sorry for disturbing you guys, that was fully my issue :-)

But what was it? Your explanation "offline script" made no sense. If
you explain then the next person who makes the same mistake will be
able to find the answer in the archives.

/joel

_______________________________________________
List: Catalyst@...
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@.../
Dev site: http://dev.catalyst.perl.org/

Re: I'm getting wrong uri_for

by Oleg Pronin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I rendered tt2 template from offline script (mail template). On
catalyst 5.7 i made a "fake" object i.e.
$c = new MyApp();
and set
$c->request/response etc. for the code to work as in request with no
differences.

But the way i initialized Request object is no longer working on 5.8
because Request is a Moose-based class. :-)

2009/10/12 Joel Bernstein <joel@...>:

> 2009/10/12 Oleg Pronin <syber.rus@...>:
>> sorry for disturbing you guys, that was fully my issue :-)
>
> But what was it? Your explanation "offline script" made no sense. If
> you explain then the next person who makes the same mistake will be
> able to find the answer in the archives.
>
> /joel
>
> _______________________________________________
> List: Catalyst@...
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@.../
> Dev site: http://dev.catalyst.perl.org/
>

_______________________________________________
List: Catalyst@...
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@.../
Dev site: http://dev.catalyst.perl.org/

Re: I'm getting wrong uri_for

by Tomas Doran :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Oleg Pronin wrote:
> I rendered tt2 template from offline script (mail template). On
> catalyst 5.7 i made a "fake" object i.e.
> $c = new MyApp();
> and set
> $c->request/response etc. for the code to work as in request with no
> differences.
>
> But the way i initialized Request object is no longer working on 5.8
> because Request is a Moose-based class. :-)

Right.

That's massive doing it wrong.

Needing to load Catalyst in scripts to send mail means abstraction fail :/

Cheers
t0m

_______________________________________________
List: Catalyst@...
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@.../
Dev site: http://dev.catalyst.perl.org/