[Catalyst] Configuring Model::DBI::SQL::Library from an yaml file

Robert 'phaylon' Sedlacek rs at 474.at
Fri Mar 9 15:33:46 GMT 2007


john utaka wrote:

>> Is 'MyApp::Model::DBI::SQL::Library' _really_ the name of the model in
>> your application?
> 
> Yes it is !

I think the problem is that the module author has overridden new() and 
is not passing all possible arguments to the original:

   my ( $self, $c ) = @_;
   $self = $self->NEXT::new($c);

If that would read

   my ( $self, $c, @args ) = @_;
   $self = $self->NEXT::new($c, @args);

or something like

   my $class = shift;
   my $self  = $class->NEXT::new(@_);

(you get the idea) the configuration passed by the COMPONENT() method 
would get passed on. Maybe you could report (or forward this mail) to 
the author of the module for consideration? I don't know if he's on the 
list.

Class::C3 is also favored over NEXT these days, but that has nothing to 
do with this issue.

-- 
# Robert 'phaylon' Sedlacek
# Perl 5/Catalyst Developer in Hamburg, Germany
{ EMail => ' rs at 474.at ', Web => ' http://474.at ' }



More information about the Catalyst mailing list