[Catalyst] Bug in Catalyst::Base config() ?

LU, ZHENYUAN [AG/1000] zhenyuan.lu at monsanto.com
Wed Nov 9 22:37:57 CET 2005


Hi list:

I experienced some weirdness in Catalyst 5.33. I found it came from the
config() in Catalyst::Base.

package MyApp::C::A;
use base qw/Catalyst::Base/;
__PACKAGE__->config( name => 'A' );
1;

package MyApp::C::B;
use base qw/MyApp::C::A/;
__PACKAGE__->config( name => 'B' );
1;

package MyApp::C::C;
use base qw/MyApp::C::A/;
__PACKAGE__->config( name => 'C' );
sub printName {
      print shift->config->{name}; ##this could be 'B' or 'C' depending on
the loading of the components
}
1;

I fixed it in my local version as following:
if (@_) { $self->_config( { %{ $self->_config } } );


Zhenyuan

---------------------------------------------------------------------------------------------------------
This e-mail message may contain privileged and/or confidential information, and is intended to be received only by persons entitled to receive such information. If you have received this e-mail in error, please notify the sender immediately. Please delete it and all attachments from any servers, hard drives or any other media. Other use of this e-mail by you is strictly prohibited.


All e-mails and attachments sent and received are subject to monitoring, reading and archival by Monsanto. The recipient of this e-mail is solely responsible for checking for the presence of "Viruses" or other "Malware". Monsanto accepts no liability for any damage caused by any such code transmitted by or accompanying this e-mail or any attachment.
---------------------------------------------------------------------------------------------------------




More information about the Catalyst mailing list