RE: [Catalyst] The model -is- where your business logic lives.

2007-09-28 Thread Dami Laurent (PJ)
-Message d'origine- De : Matt S Trout [mailto:[EMAIL PROTECTED] Envoyé : jeudi, 27. septembre 2007 22:44 Don't confuse class -names- with the nature of classes. MyApp::Model:: is *adapters* that make a model available to MyApp, not where your domain model logic itself should live.

Re: [Catalyst] get the path to the home

2007-09-28 Thread Chisel Wright
On Fri, Sep 28, 2007 at 03:30:23PM +0300, Octavian Rasnita wrote: Hi, I have a I18N module in my Catalyst application and I want to get the path to the home directory of the application. Is it possible to get it without hard codding it in that module? The module is: package

[Catalyst] get the path to the home

2007-09-28 Thread Octavian Rasnita
Hi, I have a I18N module in my Catalyst application and I want to get the path to the home directory of the application. Is it possible to get it without hard codding it in that module? The module is: package MyApp::I18N::ro; Thank you. Octavian

Re: [Catalyst] The model -is- where your business logic lives.

2007-09-28 Thread Barry Hoggard
On 9/27/07, Matt S Trout [EMAIL PROTECTED] wrote: I usually these days have MyApp::Web for the catalyst app instead of MyApp so I can deploy things like MyApp::DataStore from a separate dir tree. How do you deal with configuring the database connection for things like cron jobs outside of

Re: [Catalyst] The model -is- where your business logic lives.

2007-09-28 Thread Pedro Melo
Hi, On Sep 28, 2007, at 8:55 AM, Ian Docherty wrote: MyCompany::MyApp::Controller MyCompany::MyApp::View MyCompany::MyApp::Model MyCompany::MyApp::Schema (where my ORM goes) MyCompany::MyApp::Logic (where my other business logic goes) I originally created the 'Logic' namespace because I was

Re: [Catalyst] get the path to the home

2007-09-28 Thread Peter Karman
On 09/28/2007 07:30 AM, Octavian Rasnita wrote: Hi, I have a I18N module in my Catalyst application and I want to get the path to the home directory of the application. Is it possible to get it without hard codding it in that module? $c-path_to() -- Peter Karman . [EMAIL PROTECTED]

[Catalyst] setup_home bug (with fix): wrong detection of home directory

2007-09-28 Thread Oleg Pronin
Hello. I put the service script into APP_HOME/script/service/online_users.plx In the script: use FindBin; use lib $FindBin::Bin/../../lib; use MyApp; print MyApp-path_to('/'); # prints APP_HOME/script/service/ Fix for Catalyst::Utils (sub Catalyst::Utils::home): 174,176c174,177

[Catalyst] Re: Subsessions?

2007-09-28 Thread Rainer Clasen
Yuval Kogman wrote: sub session { [...] return $self-NEXT::session-{$sub} ||= {}; Zbigniew Lukasiak wrote: On 9/27/07, Rainer Clasen [EMAIL PROTECTED] wrote: So I'm searching for something functional similar to:

Re: [Catalyst] get the path to the home

2007-09-28 Thread Mark Zealey
The __FILE__ compile-time constant may be of some use.. You should be able to get the directory of the current module by doing something like: package MyApp::I18N::foo; use strict; sub get_my_dir { my ($dir) = __FILE__ =~ m!^ (.*) / [^/]+ !x; return $dir; } Of course, if you wanted to do

Re: [Catalyst] get the path to the home

2007-09-28 Thread Oleg Pronin
MyApp-path_to() 2007/9/28, Octavian Rasnita [EMAIL PROTECTED]: Hi, I have a I18N module in my Catalyst application and I want to get the path to the home directory of the application. Is it possible to get it without hard codding it in that module? The module is: package

Re: [Catalyst] get the path to the home

2007-09-28 Thread Sergio Salvi
Have you looked at FindBin? use FindBin; from the docs: EXPORTABLE VARIABLES $Bin - path to bin directory from where script was invoked $Script - basename of script from which perl was invoked $RealBin - $Bin with all links resolved $RealScript

[Catalyst] How to pass args/data from one controller to another?

2007-09-28 Thread Dustin Suchter
So I've thought of a few different ways to pass data between Local methods across two different controllers, but none of them seem like good ideas. I still don't fully get the Catalyst framework yet, so I'm asking a very open question, What are a few right ways to do this? TIMTOWTDI, of course.

[Catalyst] Re: get the path to the home

2007-09-28 Thread A. Pagaltzis
* Octavian Rasnita [EMAIL PROTECTED] [2007-09-28 14:40]: I have a I18N module in my Catalyst application and I want to get the path to the home directory of the application. Is it possible to get it without hard codding it in that module? See Catalst::Component::ACCEPT_CONTEXT. Disregard the