[Catalyst] Handy shotcuts

2008-03-20 Thread Alex Povolotsky
Hello! I've implemented $c-uri_redirect($path) as a shortcut to $c-res-redirect($c-uri_for($path)) and $c-uri_redirect_d($path) as $c-uri_redirect($path); $c-detach() I guess these shortcuts are really useful. Patch is attached. Alex. --- Catalyst.pm.orig 2008-03-20 13:11:59.0

[Catalyst] Re: ACL confusion

2008-03-20 Thread Aristotle Pagaltzis
* Chisel Wright [EMAIL PROTECTED] [2008-03-20 11:25]: Unless I need more coffee, these two say different things. They do. Is the only way to get OR like behaviour to use the example from the cookbook? (You mean the advent entry.) No. Zoo-deny_access_unless( /moose_cage, sub { my

[Catalyst] Re: Handy shotcuts

2008-03-20 Thread Aristotle Pagaltzis
* Alex Povolotsky [EMAIL PROTECTED] [2008-03-20 11:25]: +sub uri_redirect { +my ($c, $path) = @_; +return $c-response-redirect($c-uri_for($path)); +} But `uri_for` can take a lot more parameters than just one; there’s no reason you have to restrict your utility methods to the first

Re: [Catalyst] Handy shotcuts

2008-03-20 Thread Bill Moseley
On Thu, Mar 20, 2008 at 01:17:18PM +0300, Alex Povolotsky wrote: I've implemented $c-uri_redirect($path) as a shortcut to $c-res-redirect($c-uri_for($path)) and $c-uri_redirect_d($path) as $c-uri_redirect($path); $c-detach() I guess these shortcuts are really useful. Patch is

RE: [Catalyst] Chart::Graph::Gnuplot trouble.

2008-03-20 Thread Gene Selkov
On Mon, 17 Mar 2008, Peter Edwards wrote: In Chart::Graph::Gnuplot latest it looks like line 768 is in _exec_gnuplot() which calls system() to run gnuplot. There are known problems getting the exit status back from a spawned process under Catalyst. I hit this a while ago. I didn't manage to

Re: [Catalyst] Re: Handy shotcuts

2008-03-20 Thread Michele Beltrame
Hi Aristotle! But `uri_for` can take a lot more parameters than just one; there’s no reason you have to restrict your utility methods to the first one. Also, it would be handy to be able to pass the status parameter (i.e. 303 is widely used) to res-redirect() when using these utlity methods

Re: [Catalyst] How do I access 'Catalysed' custom datasets?

2008-03-20 Thread Ian Sillitoe
Ah, good question - composing my response helped me figure out the answer. Thanks. I was getting confused by use of class methods in the DBIx::Class::Manual::Cookbook example - I've changed things around so that I only access the schema via instance methods and everything works fine. Many

Re: [Catalyst] How do I access 'Catalysed' custom datasets?

2008-03-20 Thread Ian Sillitoe
Thanks for the reply. No, it's got to do with the fact that you seem to be confused about what ResultSets and ResultSources are, they're very different things. So, yes take it to the DBIC mailing list. Yup, I'm aware of this, but my post was obviously confusing, sorry. My method was

Re: [Catalyst] Re: Handy shotcuts

2008-03-20 Thread J. Shirley
On Thu, Mar 20, 2008 at 7:05 AM, Michele Beltrame [EMAIL PROTECTED] wrote: Hi Aristotle! But `uri_for` can take a lot more parameters than just one; there's no reason you have to restrict your utility methods to the first one. Also, it would be handy to be able to pass the status

Re: [Catalyst] Re: Handy shotcuts

2008-03-20 Thread J. Shirley
On Thu, Mar 20, 2008 at 8:36 AM, Matt Lawrence [EMAIL PROTECTED] wrote: J. Shirley wrote: On Thu, Mar 20, 2008 at 7:05 AM, Michele Beltrame [EMAIL PROTECTED] wrote: Hi Aristotle! But `uri_for` can take a lot more parameters than just one; there's no reason you have to

[Catalyst] Re: Handy shotcuts

2008-03-20 Thread Aristotle Pagaltzis
* J. Shirley [EMAIL PROTECTED] [2008-03-20 16:30]: Something that sets the status to 303 if the request type is a post (and HTTP 1.1 as Aristotle posted earlier, although I'm not sure what the best way to check is. Assume it is unless stated otherwise, or vice-versa?) That’s pretty simple:

[Catalyst] Re: Handy shotcuts

2008-03-20 Thread Aristotle Pagaltzis
* Matt Lawrence [EMAIL PROTECTED] [2008-03-20 16:50]: It would be cleaner, but less concise, to use a hash-like configuration: # Temporary redirect to /my/action/1/2/3?q=search%20string $c-uri_redirect({ action = '/my/action', args = [qw( 1 2 3 )], status = 307, query = { q =

Re: [Catalyst] Chart::Graph::Gnuplot trouble.

2008-03-20 Thread Bruce J Keeler
Gene Selkov wrote: But I would also like a competent answer to this question: what can be done to make the normal Catalyst code interact with unix processes on all 3 channels? I mean, all 3: if a process spews something on stderr, I'd like to capture that, consider how severe the message is

RE: [Catalyst] Chart::Graph::Gnuplot trouble.

2008-03-20 Thread Wade . Stuart
Gene Selkov [EMAIL PROTECTED] wrote on 03/20/2008 08:26:22 AM: On Mon, 17 Mar 2008, Peter Edwards wrote: But I would also like a competent answer to this question: what can be done to make the normal Catalyst code interact with unix processes on all 3 channels? I mean, all 3: if a process

Re: [Catalyst] Re: Patch for Catalyst::Plugin::Unicode::Encoding

2008-03-20 Thread Peter Karman
Perhaps the best approach would be to warn and not decode when flagged data is seen, that way the data should never be deformed and the author can see that something else is decoding too early and they can fix it. I like this proposal. Doesn't break backwards compat and gives user something

[Catalyst] Catalyst controllers - can they be created without catalyst.pl helper script?

2008-03-20 Thread Devin Austin
Hiya all, I was playing around the other day when I tried to create a simple controller with out using the Catalyst.pl helper script. It wasn't loaded when I restarted my devel server, so I figured that there must be a dispatch table somewhere storing the names of the Controller files, and that

Re: [Catalyst] Catalyst controllers - can they be created without catalyst.pl helper script?

2008-03-20 Thread Ashley
On Mar 20, 2008, at 12:12 PM, Devin Austin wrote: I was playing around the other day when I tried to create a simple controller with out using the Catalyst.pl helper script. It wasn't loaded when I restarted my devel server, so I figured that there must be a dispatch table somewhere

Re: [Catalyst] Catalyst controllers - can they be created without catalyst.pl helper script?

2008-03-20 Thread Devin Austin
(Pardon the lack of quoting, GMail is flaking out on me) Re: attributes Aha. I think that's where I went wrong. Re: test stubs Agreed, however in a situation when I'm on my laptop (most of the day while I'm away from my room with my real computer) and I don't want to put myself through the pain

Re: [Catalyst] Re: ACL confusion

2008-03-20 Thread Chisel Wright
On Thu, Mar 20, 2008 at 01:39:58PM +0100, Aristotle Pagaltzis wrote: (You mean the advent entry.) I mean the cookbook. I copied the example below straight out of Access Control Lists in Catalyst::Manual::Cookbook Zoo-deny_access_unless( /moose_cage, sub { my $c = shift;

Re: [Catalyst] Catalyst controllers - can they be created without catalyst.pl helper script?

2008-03-20 Thread Jonathan Rockway
* On Thu, Mar 20 2008, Devin Austin wrote: Agreed, however in a situation when I'm on my laptop (most of the day while I'm away from my room with my real computer) and I don't want to put myself through the pain of installing perl and Catalyst on Windows, I'd like to be able to create new

[Catalyst] Re: ACL confusion

2008-03-20 Thread Aristotle Pagaltzis
* Chisel Wright [EMAIL PROTECTED] [2008-03-20 21:05]: On Thu, Mar 20, 2008 at 01:39:58PM +0100, Aristotle Pagaltzis wrote: But you can write multiple rules for the same action; why not do it that way? __PACKAGE__-deny_access_unless( '/books/delete', [ $_ ] ) for qw/user