[Catalyst] Reaction Development?

John Napiorkowski jjn1056 at yahoo.com
Tue Feb 6 16:15:36 GMT 2007


--- Matt S Trout <dbix-class at trout.me.uk> wrote:

> 
> On 6 Feb 2007, at 15:33, John Napiorkowski wrote:
> 
> >
> > --- Jason Kohles <email at jasonkohles.com> wrote:
> >
> >> On Feb 5, 2007, at 5:58 PM, John Napiorkowski
> wrote:
> >>
> >>> Hi,
> >>>
> >>> Is there a test suite for Reaction other than
> the
> >>> sample application at the source control site?
> >>> Because I have a patch to fix a problem with the
> >> DBIC
> >>> action reflector not properly creating actions
> for
> >>> DBIC classes in a deep hierarchy (like
> >>> myschema::membership::members) but since I could
> >> never
> >>> get the sample app to run I can't write a test
> for
> >> the
> >>> problem (and I know a patch without a test won't
> >> be
> >>> accepted).
> >>>
> >> Any chance you could share the patch even though
> it
> >> doesn't have
> >> tests yet?  I've been looking for this bug off
> and
> >> on for the last
> >> three or four days, it's been driving me crazy...
> >
> > Not sure if this is the same bug as what is
> causing
> > you trouble.  My problem is when I have 'deep'
> > hierarchies under my DBIC Schema, something like:
> >
> > /myapplib
> >   /Schema
> >     db.pm, # inheriting from DBIx::Class::Schema
> >       /db
> >         /membership
> >           members.pm #inherit from DBIx::Class
> >
> > so the package name for that "members.pm" file
> would
> > be something like:
> >
> > package myapplib::Schema::db::membership::members;
> >
> > I found the actions that the action reflector
> would
> > create would look something like:
> >
> > catapp::Model::Action::Createmembers
> > catapp::Model::Action::Deletemembers
> > catapp::Model::Action::Updatemembers
> 
> Which is why I'm mostly using the
> ->reflect_action_for syntax and  
> using Model::Membership::Members::Action::Create and
> similar, to go  
> with the way stuff works by default in
> InterfaceModel::Object- 
>  >action_for

So something like:

package manage::Model::Action;

my $r = ActionReflector->new;

$r->reflect_action_for(

  'mylib::schemas::db::membership::members',
   __PACKAGE__.'membership::members::create',
  'Create',
);

[one of the above for each action type]

Would also have solved the problem, I guess?  I guess
this way give you more finely tuned control.

--john

> 
> 
> -- 
> Matt S Trout, Technical Director, Shadowcat Systems
> Ltd.
> Offering custom development, consultancy and support
> contracts for  
> Catalyst,
> DBIx::Class and BAST. Contact mst (at)
> shadowcatsystems.co.uk for  
> details.
> + Help us build a better perl ORM: http://dbix- 
> class.shadowcatsystems.co.uk/ +
> 
> 
> 
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo:
> http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive:
>
http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
> 



 
____________________________________________________________________________________
Get your own web address.  
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL



More information about the Catalyst mailing list