Re: [Catalyst] how to implement Transactions (over different db tables) in a Catalyst project

2009-07-06 Thread Ali M.
Kakimoto I recommend you read this article http://blog.urth.org/2009/07/what-is-catalyst-really.html It might help you understand more when its a Catalyst Issue or a another component issue! And help you better trouble shoot your problems. Apparently Catalyst will help you send a request to the

Re: [Catalyst] Polymorphism?

2009-07-06 Thread Dave Rolsky
On Mon, 6 Jul 2009, J. Shirley wrote: Moose method modifiers work just fine on Catalyst code, which I find to really help with using inheritance upstream. You'll probably want to As do Moose roles. I've found using roles in controllers incredibly helpful, since I often have similar/same "pro

[Catalyst] Parse errors: Tests out of sequence - any ideas?

2009-07-06 Thread kakimoto
hello, everyone, I jsut tried to run my regression tests to see if things were ok or not. I found that they fail due to "Parse errors: Tests out of sequence". I took one of the regression test files and stripped down the tests to about 5 basic tests. Ran prove -v and still fails with this mes

Re: [Catalyst] how to implement Transactions (over different db tables) in a Catalyst project

2009-07-06 Thread kakimoto
On Tue, Jul 7th, 2009 at 8:54 AM, "J. Shirley" wrote: > On Mon, Jul 6, 2009 at 3:36 PM, wrote: > > > there's somethign wrong with the mailing list for Dbix::Class as I have not been able to get replies /mails. I have contacted the admin in the past and never got any reply. I will retry. Sor

Re: [Catalyst] how to implement Transactions (over different db tables) in a Catalyst project

2009-07-06 Thread kakimoto
It (http://search.cpan.org/~ribasushi/DBIx-Class-0.08107/lib/DBIx/Class/Storage.pm#txn_do) says, "If an exception is caught, a rollback is issued and the exception is rethrown. If the rollback fails, (i.e. throws an exception) an exception is thrown that includes a "Rollback failed" message". an

Re: [Catalyst] Polymorphism?

2009-07-06 Thread J. Shirley
On Mon, Jul 6, 2009 at 3:33 PM, Eric Wright wrote: > I'm just wondering if any Catalyst programmers have used polymorphism in > the construction of their controller classes. Coming from a Java background > I'd like to be a little more OOP about how I implement my controllers. i.e. > I'd like to b

Re: [Catalyst] how to implement Transactions (over different db tables) in a Catalyst project

2009-07-06 Thread J. Shirley
On Mon, Jul 6, 2009 at 3:36 PM, wrote: > > > However, this is NOT a Catalyst question. Please subscribe to the > > DBIx::Class users list at: > > http://lists.scsys.co.uk/mailman/listinfo/dbix-class/ and ask these > > > > questions there. Many of the subscribers are the same, but many > > Catalys

Re: [Catalyst] how to implement Transactions (over different db tables) in a Catalyst project

2009-07-06 Thread Andrew Rodland
On Monday 06 July 2009 05:37:49 pm kakim...@tpg.com.au wrote: > > Did you even look for this in the manual? > > > > http://search.cpan.org/~ribasushi/DBIx-Class-0.08107/lib/DBIx/Class/ > > Storage.pm#txn_do > > > > If not, why not. If so, how is this not clear? > > Well, it's really clear now . I s

Re: [Catalyst] how to implement Transactions (over different db tables) in a Catalyst project

2009-07-06 Thread kakimoto
> > Did you even look for this in the manual? > > http://search.cpan.org/~ribasushi/DBIx-Class-0.08107/lib/DBIx/Class/ > > Storage.pm#txn_do > > If not, why not. If so, how is this not clear? > Well, it's really clear now . I suppose someone has updated the documentation since I posted this

Re: [Catalyst] how to implement Transactions (over different db tables) in a Catalyst project

2009-07-06 Thread kakimoto
> > Did you look what the code does? > http://cpansearch.perl.org/src/RIBASUSHI/DBIx-Class-0.08107/lib/DBIx/Class/Storage.pm > and > http://cpansearch.perl.org/src/RIBASUSHI/DBIx-Class-0.08107/t/81transactions.t If the API doc is written well, I suppose one doens't need to look at the source cod

[Catalyst] Polymorphism?

2009-07-06 Thread Eric Wright
I'm just wondering if any Catalyst programmers have used polymorphism in the construction of their controller classes. Coming from a Java background I'd like to be a little more OOP about how I implement my controllers. i.e. I'd like to be able have a parent controller with common behavior and over

Re: [Catalyst] Themes, skins, templates and componentized UI?

2009-07-06 Thread John Napiorkowski
- Original Message From: Gunnar Strand To: catalyst@lists.scsys.co.uk Sent: Monday, July 6, 2009 3:55:27 PM Subject: [Catalyst] Themes, skins, templates and componentized UI? Hi, I am a little new in the web design area. I'm trying to design an application where the "view" part m

Re: [Catalyst] how to implement Transactions (over different db tables) in a Catalyst project

2009-07-06 Thread Tomas Doran
On 6 Jul 2009, at 12:38, kakim...@tpg.com.au wrote: So, in the case of an exception, an automatic rollback will take place. I have tested this in my application and it seems that way. Can anyone confirm this? Did you even look for this in the manual? http://search.cpan.org/~ribasushi/DBIx

Re: [Catalyst] how to implement Transactions (over different db tables) in a Catalyst project

2009-07-06 Thread Tomas Doran
On 6 Jul 2009, at 12:32, kakim...@tpg.com.au wrote: hi Tomas and everyone:) I still have some questions as per my prev post. Can you please help me out? :) Sorry, this is too far into DBIC land for this list IMO. Please ask on that list. Cheers t0m ___

Re: [Catalyst] default : Local v. default : Path

2009-07-06 Thread Tomas Doran
On 6 Jul 2009, at 18:14, Paul Makepeace wrote: We just upgraded from 5.80005 to 5.80007 and default : Local is no longer matching $controller/ (i.e. requires $controller/default) I was curious what the difference is, and flagging it for anyone else. Yes, sorry about that - it's a regressio

[Catalyst] Themes, skins, templates and componentized UI?

2009-07-06 Thread Gunnar Strand
Hi, I am a little new in the web design area. I'm trying to design an application where the "view" part must be simple to replace by whomever installs it, with elements of their own design. This would work comparable to "themes" or "skins". I've done some googling, but I haven't got any obvio

[Catalyst] Integrating with ASP.NET sessions and authentication

2009-07-06 Thread Robert Mah
I was wondering if anyone has integrated a Catalyst application with ASP.NET session and authentication (for single sign-on if possible). My company recently go acquired and we've been told to integrate our systems with theirs (ASP.NET). I know next to nothing about how .NET works and was hoping s

[Catalyst] default : Local v. default : Path

2009-07-06 Thread Paul Makepeace
We just upgraded from 5.80005 to 5.80007 and default : Local is no longer matching $controller/ (i.e. requires $controller/default) I was curious what the difference is, and flagging it for anyone else. FWIW, IMO, http://search.cpan.org/~hkclark/Catalyst-Manual-5.8000/lib/Catalyst/Manual/Intro.pod

Re: [Catalyst] how to implement Transactions (over different db tables) in a Catalyst project

2009-07-06 Thread Joel Bernstein
On 6 Jul 2009, at 12:38, kakim...@tpg.com.au wrote: So, in the case of an exception, an automatic rollback will take place. I have tested this in my application and it seems that way. Did you look what the code does? http://cpansearch.perl.org/src/RIBASUSHI/DBIx-Class-0.08107/lib/DBIx/Class/

Re: [Catalyst] how to implement Transactions (over different db tables) in a Catalyst project

2009-07-06 Thread kakimoto
So, in the case of an exception, an automatic rollback will take place. I have tested this in my application and it seems that way. Can anyone confirm this? Thank you:) > This is fairly easy to get wrong - txn_do forces you to have a block > > which comprises the transaction scope, or your cod

Re: [Catalyst] how to implement Transactions (over different db tables) in a Catalyst project

2009-07-06 Thread kakimoto
hi Tomas and everyone:) I still have some questions as per my prev post. Can you please help me out? :) I have the following questions: 1) I looked at the terminal with all the debug messages. I noticed that the exception was caught and eventhough the roll back was done, I do not see the print

Re: [Catalyst] how to implement Transactions (over different db tables) in a Catalyst project

2009-07-06 Thread Tomas Doran
Tomas Doran wrote: $c->model('myAppDB')->txn_do( sub { my $rs = $c->model('myAppDB::Table')->search(..); # Etc etc die("Rollback") if $foo; # Exceptions cause rollback # Etc etc # If you get here, to the end, transaction is committed for you. }); And I'm crap. You need $c->m

Re: [Catalyst] how to implement Transactions (over different db tables) in a Catalyst project

2009-07-06 Thread kakimoto
hello there, Tomas, Thank you :) Yes, you're quite right there:) Prior to receiving this reply, I actually wrapped my existing code in the subroutine within an sub for the txn_do. sub save_complete_records { ... eval { $c->model('myAppDB')->schema->txn_do( sub {

Re: [Catalyst] Custom error handling

2009-07-06 Thread kakimoto
hello Tomas, thank you. I will look into fine tuning it in the future. Will read more. K. akimoto > > But throwing strings around is however a perfectly valid technique. > ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/c

Re: [Catalyst] how to implement Transactions (over different db tables) in a Catalyst project

2009-07-06 Thread Tomas Doran
On 6 Jul 2009, at 06:30, kakim...@tpg.com.au wrote: In the past, when I had to work with just DBI, I would manually start a transaction and commit it at the end if no exceptions occur. In the case of the latter, I will call a rollback. This is fairly easy to get wrong - txn_do forces you t

Re: [Catalyst] Custom error handling

2009-07-06 Thread Tomas Doran
On 6 Jul 2009, at 02:56, kakim...@tpg.com.au wrote: Using die(' A problem occurred when saving your address. Please try again later' );, I would get an error message such as "Exception caught in myApp::Controller::Subscription->_save_address" which doesn't look so good to the users. that's why

Re: [Catalyst] Hangs in RenderView in "end"

2009-07-06 Thread Tomas Doran
On 6 Jul 2009, at 05:33, Gunnar Strand wrote: Wow, that's a fairly unexpected gotcha. Any chance of a doc patch to make it easier for the next poor soul who gets stuck on this? Sure. Where would you like it? A 'NOTES' or 'CAVEATS' section in the POD for Catalyst::View::TT is the best p

Re: [Catalyst] how to implement Transactions (over different db tables) in a Catalyst project

2009-07-06 Thread Bogdan Lucaciu
On Mon, Jul 6, 2009 at 8:30 AM, wrote: >  How do I do it here in Catalyst/DbiX::Class land? > I tried to read up the > http://kobesearch.cpan.org/htdocs/DBIx-Class/DBIx/Class/Storage.html#txn_do > doc but I can't see how the example can apply to Catalyst. > > It says, "$schema->txn_do($coderef)"