[Catalyst] DB Functions in the Schema

2009-08-17 Thread Trevor Phillips
Is there an easy way to represent a DB function call as a named column within a DBIx::Class schema? eg; If at the DB level I would do something like: select updated, from_unixtime(updated) as updated2 from mytable; ... can I have; __PACKAGE__-add_columns( updated, { data_type = TIMESTAMP }

Re: [Catalyst] Why no extra attributes on Private actions?

2009-08-17 Thread Moritz Onken
__PACKAGE__-config( actions = { foo = { Path = 'bar' } } ); sub foo {} This has been introduced in 5.80006. The Catalyst-Manual just didn't catch up with the changes. cheers, moritz ___ List: Catalyst@lists.scsys.co.uk Listinfo:

Re: [Catalyst] DB Functions in the Schema

2009-08-17 Thread fREW Schmidt
I don't know the answer to this off the top of my head, but I do know that you mailed it to the wrong people :-) You are much more likey to get a good answer if you send this to the DBIC ML. Good luck! On Aug 17, 2009 3:13 AM, Trevor Phillips trevor.phill...@gmail.com wrote: Is there an easy

Re: [Catalyst] Why no extra attributes on Private actions?

2009-08-17 Thread Bill Moseley
On Sun, Aug 16, 2009 at 10:40 AM, Bill Moseley mose...@hank.org wrote: On Sat, Aug 15, 2009 at 4:28 PM, Eden Cardim edencar...@gmail.com wrote: Is there a specific reason that Private actions may not have additional attributes? You can achieve the same effect by using the :Action tag

[Catalyst] Catalyst Data Model Error

2009-08-17 Thread clive glew
Hi all, I’m attempting to get catalyst 5.80007 up and running on active state perl 5.8.9 826. It seems to install properly and i’ve been working my way through the catalyst book. However when i try to create a model using: perl script/myapp_create.pl model MyAppDB DBIC::Schema MyAppDB

Re: [Catalyst] Why no extra attributes on Private actions?

2009-08-17 Thread Paul Makepeace
On Mon, Aug 17, 2009 at 4:14 PM, Eden Cardimedencar...@gmail.com wrote: On Mon, Aug 17, 2009 at 10:57 AM, Bill Moseleymose...@hank.org wrote: I'm just after a bit more flexibility.  Perhaps that limitation could be based on what dispatch types are available (i.e. don't allow Private with any

Re: [Catalyst] DB Functions in the Schema

2009-08-17 Thread Lee Aylward
I have done stuff like that in the past by using the DBIx::Class::DynamicDefault module. There may be a better way to do it, though, so it is probably worth asking on the DBIC mailing list. -- Lee On Mon, 17 Aug 2009 16:12:58 +0800 Trevor Phillips trevor.phill...@gmail.com wrote: Is there an

[Catalyst] Inconsistent hierarchy....

2009-08-17 Thread mrchips
i have a working application which i'm installing on a fresh box, with a fresh build of everything. But i've run into this: Couldn't instantiate component threesixty::Model::CDBI, Inconsistent hierarchy during C3 merge of class 'Class::DBI::__::Base': current merge results [

Re: [Catalyst] Inconsistent hierarchy....

2009-08-17 Thread J. Shirley
On Mon, Aug 17, 2009 at 8:48 AM, mrchips mailli...@aspiretools.co.ukwrote: Infact i can't even start up the Tutorial.pm server either...so there is something about my underlying installation which is really troubling catalyst. Class::DBI seems to be the problem, but i dunno. (actually, when

Re: [Catalyst] Why no extra attributes on Private actions?

2009-08-17 Thread Bill Moseley
On Mon, Aug 17, 2009 at 8:14 AM, Eden Cardim edencar...@gmail.com wrote: I don't understand your obsession over :Private. A method tagged with :Action, or any other attribute that doesn't make it use one of the available dispatch types is effectively *the same thing* as a Private action,

Re: [Catalyst] Inconsistent hierarchy....

2009-08-17 Thread mrchips
Which tutorial are you following, exactly? The Catalyst::Manual::Tutorial is using DBIx::Class and I've yet to see any Catalyst tutorial that uses Class::DBI. sorry, i'm not following any tutorial. I just meant that one of the downloadable tutorial projects (which doesn't do much beyond a bit

Re: [Catalyst] Inconsistent hierarchy....

2009-08-17 Thread J. Shirley
On Mon, Aug 17, 2009 at 12:30 PM, mrchips mailli...@aspiretools.co.ukwrote: Which tutorial are you following, exactly? The Catalyst::Manual::Tutorial is using DBIx::Class and I've yet to see any Catalyst tutorial that uses Class::DBI. sorry, i'm not following any tutorial. I just meant

Re: [Catalyst] Catalyst Data Model Error

2009-08-17 Thread Tomas Doran
On 17 Aug 2009, at 15:48, clive glew wrote: I’m attempting to get catalyst 5.80007 up and running on active state perl 5.8.9 826. It seems to install properly and i’ve been working my way through the catalyst book. However when i try to create a model using: The 'autobox' package

Re: [Catalyst] Why no extra attributes on Private actions?

2009-08-17 Thread Tomas Doran
On 15 Aug 2009, at 19:44, Bill Moseley wrote: Is there a specific reason that Private actions may not have additional attributes? No, there is not. At the time when that code was written, additional attributes (for example, those used by Catalyst::Controller::ActionRole) weren't

Re: [Catalyst] Why no extra attributes on Private actions?

2009-08-17 Thread Tomas Doran
On 17 Aug 2009, at 09:47, Moritz Onken wrote: __PACKAGE__-config( actions = { foo = { Path = 'bar' } } ); sub foo {} This has been introduced in 5.80006. The Catalyst-Manual just didn't catch up with the changes. No, it was not. What gave you that impression?

Re: [Catalyst] Make Catalyst NOT reset a cookie on a per action basis

2009-08-17 Thread Tomas Doran
On 16 Aug 2009, at 19:59, Steve Kleiman wrote: WHAT I CAN SEE: Catalyst engine calls finalize_cookies which resets every cookie it finds. This takes place before the 'begin' method and the 'Set- Cookie' header has already been dispatched. Therefore removing that header in 'begin' does

Re: [Catalyst] Why no extra attributes on Private actions?

2009-08-17 Thread Moritz Onken
Am 17.08.2009 um 23:19 schrieb Tomas Doran: On 17 Aug 2009, at 09:47, Moritz Onken wrote: __PACKAGE__-config( actions = { foo = { Path = 'bar' } } ); sub foo {} This has been introduced in 5.80006. The Catalyst-Manual just didn't catch up with the changes. No, it was not. What gave

Re: [Catalyst] Why no extra attributes on Private actions?

2009-08-17 Thread Tomas Doran
On 17 Aug 2009, at 22:50, Moritz Onken wrote: Until then it was necessary to add at least one attribute to the method. The calendar uses :Local as attribute. Aah, yes - my bad, you're totally correct, you needed to sprinkle :Action around as decoration.. :) ++ Whoever fixed that...

Re: [Catalyst] Make Catalyst NOT reset a cookie on a per action basis

2009-08-17 Thread Steve Kleiman
Thanks for taking a look. I thought I had it isolated but seems not. Tried what you suggested below but the instigator of the cookie happens at a different juncture. The instigator for a 'Catalyst::Plugin::Session' cookie being set is 'Session::prepare_action'. The method calls 'sessionid'

Re: [Catalyst] Make Catalyst NOT reset a cookie on a per action basis

2009-08-17 Thread Tomas Doran
On 18 Aug 2009, at 01:19, Steve Kleiman wrote: Thanks for taking a look. I thought I had it isolated but seems not. Tried what you suggested below but the instigator of the cookie happens at a different juncture. The instigator for a 'Catalyst::Plugin::Session' cookie being set is

Re: [Catalyst] DB Functions in the Schema

2009-08-17 Thread Trevor Phillips
On Mon, Aug 17, 2009 at 9:31 PM, fREW Schmidtfri...@gmail.com wrote: I don't know the answer to this off the top of my head, but I do know that you mailed it to the wrong people :-)  You are much more likey to get a good answer if you send this to the DBIC ML. I considered that, but the

Re: [Catalyst] Make Catalyst NOT reset a cookie on a per action basis

2009-08-17 Thread Steve Kleiman
Thanks for getting back again. Weird. I didn't dig in too deep to figure why this is, but it is. This was what was suggested but didn't work: $c-res-cookies({}) However this did: $c-res-headers-remove_header('Set-Cookie') Thank you, Tomas. -steve On Aug 17, 2009, at 5:50 PM, Tomas