-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.
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
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
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
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
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]
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
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:
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
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
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
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.
* 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
13 matches
Mail list logo