[Catalyst] ConfigLoader does not find my yml file

Matt S Trout dbix-class at trout.me.uk
Sat Sep 23 12:49:31 CEST 2006


Dean Brockhausen wrote:
> I am working through the tutorial in the manual and I have run accross
>  small problem.  In the Authentication step, you modify the yml file
> to
> 
>  name: MyApp
>    authentication:

^^^^^^^^^^^^^^^^^^

that indent level shouldn't be there - authentication should be at top-level.

>        dbic:
>            # Note this first definition would be the same as setting
>            # __PACKAGE__->config->{authentication}->{dbic}->{user_class}
> = 'MyAppDB::User'
>            # in lib/MyApp.pm (IOW, each hash key becomes a "name:" in
> the YAML file).
>            #
>            # This is the model object created by
> Catalyst::Model::DBIC from your
>            # schema (you created 'MyAppDB::User' but as the Catalyst startup
>            # debug messages show, it was loaded as
> 'MyApp::Model::MyAppDB::User').
>            # NOTE: Omit 'MyApp::Model' to avoid a component lookup
> issue in Catalyst 5.66
>            user_class: MyAppDB::User
>            # This is the name of the field in your 'users' table that
> contains the user's name
>            user_field: username
>            # This is the name of the field in your 'users' table that
> contains the password
>            password_field: password
>            # Other options can go here for hashed passwords
> 
> 
> however when I star the server I get :
> 
> You must provide a user_class at
> C:/strawberry-perl/perl/site/lib/Catalyst.pm line 862
> 
> if I add the lines suggested by the comments in the yml file I do not
> get this error.
> 
> I think that the yml file is not being loaded,  the yml file is in the
> directory with the DB.  This is also the directory reported as home by
> the server script.
> 
> Any help would be appreciated.



-- 
      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Catalyst mailing list