[Catalyst] Pulling My Hair Out with DBIx::Schema For Authentication and Authorization

Kieren Diment diment at gmail.com
Fri Mar 24 00:21:15 CET 2006


On 22/03/06, hkclark at gmail.com <hkclark at gmail.com> wrote:
>
> On 3/21/06, hkclark at gmail.com <hkclark at gmail.com> wrote:
> >
> > Hi Brandon,
> >
> > Many thanks for the note.  I added these two lines to
> > lib/MyApp/Db/Schema/UserRole.pm:
> >   __PACKAGE__->belongs_to(user => 'MyApp::Db::Schema::User');
> >   __PACKAGE__->belongs_to(role => 'MyApp::Db::Schema::Role');
> >
> <snip>
> >
>
> In the hope that it might make it easier for others to study & learn
> from my problem, I have attached a small 6.8K tarball of the MyApp
> Catalyst project directory I have been using (I deleted the
> /root/static/images just to save ~38K of space).  Hopefully
> attachments aren't a problem on this list (I know I have seen patch
> files, but not sure I have seen actual project tarballs before) -- my
> apologies in advance if this is a faux pas.



One valid approach to this kind of problem is to take the example in
DBIx::Class::Manual::Example and adapt all the code there for your own
database.  The advantage of this approach is that you have a (as guaranteed
as possible) working codebase with which to work with.  Following through
with the whole example will give you valid tests as well.




Given that it sounds like the schema DBIC approach is the future
> mainstream of Catalyst, I'm thinking this is going to be a very
> typical setup.  My hope is to get this working, and then I can add it
> to the wiki with some comments and a description of what it's doing to
> help others get over this hurdle.
>
> Thanks,
> H
>
>
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060324/7acd9a29/attachment.htm 


More information about the Catalyst mailing list