[Catalyst] Quesion about Chaining usage
John Napiorkowski
jjn1056 at yahoo.com
Tue Sep 5 19:58:52 CEST 2006
Matt,
I created a test case and a test for the issue I am
having. I tried to match the way this was done in the
Catalyst test directory but I have to be honest and
say I am still a learner when it comes to this so I
probably need some pointers to get it to a place where
it can be properly integrated.
For example, should I just make this a patch to the
"live_component_controller_action_chained.t" file and
add my test controller to the
"/t/lib/TestApp/Controller/Action/Chained/" directory?
What I did was just create a tarball of the catalyst
application folder but I just put my test and test
controller in it. I can run it from my box without
any trouble if you just cd to the 't' directory
because I use lib '../lib' to load stuff up.
Basically it fails test number 7 and you can see in
the output that it chains in a way that I would not
expect based on the way I think I understand chaining.
Take a look and let me know what I need to do to clean
this up and if this is really an issue with chaining
and not just some ignorance on my part.
Thanks!
--john
--- Matt S Trout <dbix-class at trout.me.uk> wrote:
> John Napiorkowski wrote:
> > I've already tried both /feedrolls and /feedrolls/
> > just to see. I've also tried changing the action
> > names around just in case there was something in
> the
> > code that would confuse similarly named subs, but
> that
> > didn't do it.
> >
> > I'm starting to get the feeling there is something
> > going on with PathPart being set to ''. This code
> > works fine if I set the feedroll action to Args(1)
> and
> > then forward to feedroll_all like I used to do
> before
> > I had chaining.
> >
> > Let me work up an example that is not dependent on
> my
> > data model, maybe someone can try running it on
> their
> > setup and see what happens. I definitely would
> not
> > rule up something borked on my side, although I
> did
> > just run an updater for all my installed Catalyst
> > modules.
> >
> > I also reran all the chaining tests I could find
> and
> > didn't get an error.
> >
> > I find that if I alter line 115 of my code example
> to
> > have a pathpart (I remove the PathPart('') so it
> goes
> > to the default of using the action name) then I
> also
> > get it to work. So there is something strange
> going
> > on when you set too many pathparts to '', which is
> > probably an abuse of the system on my part :)
>
> Possibly, but I abuse it at least that much in some
> of my code and it survives
> it. You might want to see if you can re-create it as
> a patch to the tests for
> Chained (there are quite a lot of them now thanks to
> phaylon and others), or
> to look at the tests for Chained as possible
> inspiration for finding a mistake
> neither of us have spotted.
>
> I look forward to either an e-mail going "yay!" or a
> test patch so I can fix
> this up :)
>
> --
> 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/ +
>
> _______________________________________________
> 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/
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: services.tar.gz
Type: application/x-gzip
Size: 4152 bytes
Desc: 707414274-services.tar.gz
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20060905/a984fb95/attachment.bin
More information about the Catalyst
mailing list