Personally, I'd add a few changes:
1) Create a param(), not a direct object access. So, instead of
$self-{logger}, I'd use $self-param( 'logger' );
2) Create a logger() method that looks like:
sub logger { $_[0]-param( 'logger' ) }
So, now you have
$self-logger-error( Uh-oh );
The overhead is
On Mon, 13 Dec 2004 14:45:10 -0500, Sergej Zoubok [EMAIL PROTECTED] wrote:
It might be worthwhile for the CAP::AutoConfig module to look at the
PARAMS that are defined when you create the object:
my $app = WebApp-new( PARAMS = { cfg_file = 'config.pl' });
$app-run();
This would require an
On 2004-12-13, Sergej Zoubok [EMAIL PROTECTED] wrote:
Hi folks,
In further generalizing the structure of a C::A app I thought to use
CGI::Application::Plugin::ConfigAuto. Since I'm already using some
other plugins (DBH and Session) I'd like to be able to use the
configuration parameters
Dan Horne wrote:
I currently use Log4Perl with C::A but I'm sure that even though it's not a
via plugin, I'm using it in an inefficient manner - any advice appreciated.
In my base class, I set up the name of my config file using
CGI::Application::Plugin::ConfigAuto. I my prerun mode I go
On 2004-12-13, Sergej Zoubok [EMAIL PROTECTED] wrote:
Hi folks,
In further generalizing the structure of a C::A app I thought to use
CGI::Application::Plugin::ConfigAuto. Since I'm already using some
other plugins (DBH and Session) I'd like to be able to use the
configuration parameters from
Thanks to all who responded - cleared things up a bit.
Quoting Michael Peters [EMAIL PROTECTED]:
If you are interested, I've been meaning to make a CAP::Log4perl plugin
but haven't had the time just yet. I will in a few days though. If you
wanted to you could take a shot at it yourself.
Rob Kinyon wrote:
Personally, I'd add a few changes:
1) Create a param(), not a direct object access. So, instead of
$self-{logger}, I'd use $self-param( 'logger' );
2) Create a logger() method that looks like:
sub logger { $_[0]-param( 'logger' ) }
So, now you have
On 2004-12-13, Dan Horne [EMAIL PROTECTED] wrote:
$self-{logger} = get_logger(cms);
This breaks the principle of encapsulation of Object Oriented
Programming. A benefit of objects is that they hide wants inside them.
Here you are going through a 'back door' rather than using the