[Catalyst] Loading CRUD for all tables

Torsten Seemann torsten.seemann at infotech.monash.edu.au
Mon Apr 18 06:45:37 CEST 2005


Michael,

> > I tried "shift @$c->req->args" but that doesn't work as args() is
> > a rvalue-only accessor (?).
> 
> $c->req->args should return an array-ref.
> shift @{ $c->req->args };
> worked for me, when I was taking that approach.

Yep that works thank you!
I had a brain failure with my Perl syntax there...

> (I have since shifted to having the CRUD controller -- MyApp::C::CRUD  --
> separate from the model classes, which also looks for
> MyApp::C::CRUD::MyTable and uses that if present.  The CRUD controllers have
> methods like _action_list, _action_view, etc, which are dispatched via 'sub
> process'.  It's working out pretty well, and removed a lot of concerns I had
> with the provided C::M::CRUD's willingness to call any method it can().

Yes, the can() was a bit scary.

> Though it is Cat4 code, I would be willing to share it though it is not
> really 'release-ready' (no POD, few comments).  I think it will translate
> pretty well to Cat5, too, when that is stable enough for me to upgrade to.)

I would greatly appreciate if you could send me what you have? 

I am using Cat5 now, but *any* example Catalyst code I would be very
grateful for. I won't be expecting any support with it or anything, I
just need to see examples so I can get see how different people approach
things.

-- 
Torsten Seemann <torsten.seemann at infotech.monash.edu.au>
Victorian Bioinformatics Consortium





More information about the Catalyst mailing list