Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

I'm getting wrong uri_for

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


syber.rus at gmail

Oct 12, 2009, 10:19 AM

Post #1 of 10 (1552 views)
Permalink
I'm getting wrong uri_for

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 [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


bobtfish at bobtfish

Oct 12, 2009, 10:27 AM

Post #2 of 10 (1494 views)
Permalink
Re: I'm getting wrong uri_for [In reply to]

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 [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


jshirley at gmail

Oct 12, 2009, 10:31 AM

Post #3 of 10 (1499 views)
Permalink
Re: I'm getting wrong uri_for [In reply to]

On Mon, Oct 12, 2009 at 10:19 AM, Oleg Pronin <syber.rus [at] gmail> 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


syber.rus at gmail

Oct 12, 2009, 10:32 AM

Post #4 of 10 (1485 views)
Permalink
Re: I'm getting wrong uri_for [In reply to]

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 [at] 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 [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/
>

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


bobtfish at bobtfish

Oct 12, 2009, 10:36 AM

Post #5 of 10 (1495 views)
Permalink
Re: I'm getting wrong uri_for [In reply to]

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 [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


syber.rus at gmail

Oct 12, 2009, 10:39 AM

Post #6 of 10 (1502 views)
Permalink
Re: I'm getting wrong uri_for [In reply to]

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

2009/10/12 Tomas Doran <bobtfish [at] 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 [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/
>

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


jshirley at gmail

Oct 12, 2009, 10:43 AM

Post #7 of 10 (1495 views)
Permalink
Re: I'm getting wrong uri_for [In reply to]

On Mon, Oct 12, 2009 at 10:39 AM, Oleg Pronin <syber.rus [at] gmail> wrote:

> sorry for disturbing you guys, that was fully my issue :-)
>
> 2009/10/12 Tomas Doran <bobtfish [at] 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.


joel at fysh

Oct 12, 2009, 10:47 AM

Post #8 of 10 (1496 views)
Permalink
Re: I'm getting wrong uri_for [In reply to]

2009/10/12 Oleg Pronin <syber.rus [at] gmail>:
> 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 [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


syber.rus at gmail

Oct 13, 2009, 6:24 AM

Post #9 of 10 (1449 views)
Permalink
Re: I'm getting wrong uri_for [In reply to]

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 [at] fysh>:
> 2009/10/12 Oleg Pronin <syber.rus [at] gmail>:
>> 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 [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/
>

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


bobtfish at bobtfish

Oct 13, 2009, 6:53 AM

Post #10 of 10 (1444 views)
Permalink
Re: I'm getting wrong uri_for [In reply to]

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 [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.