Re: [Catalyst] Why does the error page include my http_proxy env var?

2006-07-13 Thread Robert 'phaylon' Sedlacek
Hartmaier Alexander said:

 Does anybody know why the cat error page shows the proxy url set in the
 http_proxy env var?

A bunch of ideas:
- It's just a dump.
- It's the debug screen, your customers/visitors should never see it.
- Debugging some issues might get a bit hard if that's just omitted.

Or did I misread your question? :)


p


___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Why does the error page include my http_proxy env var?

2006-07-13 Thread Hartmaier Alexander
Yes it's a dump, but why/how comes the env var into this perl hash?

-Alex


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:catalyst-
 [EMAIL PROTECTED] On Behalf Of Robert 'phaylon' Sedlacek
 Sent: Thursday, July 13, 2006 11:47 AM
 To: The elegant MVC web framework
 Subject: Re: [Catalyst] Why does the error page include my http_proxy
 env var?
 
 Hartmaier Alexander said:
 
  Does anybody know why the cat error page shows the proxy url set in
 the
  http_proxy env var?
 
 A bunch of ideas:
 - It's just a dump.
 - It's the debug screen, your customers/visitors should never see it.
 - Debugging some issues might get a bit hard if that's just omitted.
 
 Or did I misread your question? :)
 
 
 p
 
 
 ___
 List: Catalyst@lists.rawmode.org
 Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
 Searchable archive: http://www.mail-
 archive.com/catalyst@lists.rawmode.org/
 Dev site: http://dev.catalyst.perl.org/

***
T-Systems Austria GesmbH   Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
***
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then delete 
this e-mail immediately.
***
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] ::Model::SomeTable-some_method() problem

2006-07-13 Thread Will Hawes
Chisel Wright wrote:
 On Thu, Jul 13, 2006 at 12:49:21PM +0100, Ash Berlin wrote:
 1) You should really think about converting to DBIC::Schema instead.
 
 Yes, I'd like to, but I have no idea where to start.

The number of users still using a class-based approach must be very 
small by now so I think you'd have a better chance of getting this fixed 
by switching to Schema.

I fretted for quite a while about switching, thinking it must be 
terribly complicated. IIRC it was about as difficult as making the base 
model class inherit from Schema and changing use base in the other 
classes and took me about 20 minutes. It also improved the startup time 
of my app by several orders of magnitude.

You should find what you need at 
http://search.cpan.org/dist/DBIx-Class/lib/DBIx/Class/Manual/Intro.pod.

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] accessing action methods in a TT view

2006-07-13 Thread John Napiorkowski
Quite often I create non action methods in my controllers to centralize 
functions that don't need to be an action.  Stuff like building up a 
HTML::Widget form, etc.  Usually in the controller I call it with 
$self-local_method(...) and so forth.

Now in the TT view you have the stash and the context but I find no easy way to 
access the $self-xxx stuff. I know it can be considered bad form to have too 
much interaction between your template and your logic, but I do have uses for 
this.  Usually I just do something like $c-stash-{self} = \$self;  whereever 
I need it but this get's awefully redundant and makes my FRY ruby friends 
snicker at me.

Has anyone run into this issue and discovered a better solution?  I thought 
about putting something in a custom end action as a solution but maybe someone 
out there came up with something better (and can share it for posterity :) ).

--john



___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] accessing action methods in a TT view

2006-07-13 Thread Rodney Broom
From: John Napiorkowski [EMAIL PROTECTED]

 Usually I just do something like $c-stash-{self} = \$self;

I've been doing the same thing in some proof of concept code, expecting to bump 
into a better (more proper) way to handle it. I have a sneaking suspicion that 
we aren't supposed to talk between our controller and views like this for 
reasons like there potentially being more than one view object created during a 
response.

---
Rodney Broom


___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] accessing action methods in a TT view

2006-07-13 Thread Robert 'phaylon' Sedlacek
John Napiorkowski said:

 Now in the TT view you have the stash and the context but I find no easy
 way to access the $self-xxx stuff. I know it can be considered bad form
 to have too much interaction between your template and your logic, but I
 do have uses for this.  Usually I just do something like $c-stash-{self}
 = \$self;  whereever I need it but this get's awefully redundant and makes
 my FRY ruby friends snicker at me.

I usually abstract it one level more and make a

  sub auto : Private {
  my ( $self, $c ) = @_;
  $c-stash-{ do_stuff } = sub { ... };

  1;
  }

In most of my cases, the things I want to provide to my view from my
controller involve more than one action.


hth, p


___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/