[Dancer-users] params for post route not working

GJ gj at freeshell.org
Mon Mar 5 02:07:57 CET 2012


On Thu, Mar 01, 2012 at 12:13:03PM +0100, Perlover wrote:
> Hello,
> 
> > So, I finally got around to this: I can report that Perlover's version fixes the issue with POSTed params.
> 
> Thanks for good news ;-)
> 
> May be patch will be applied to official branch?
> It waits already 3 months :)

OK, things are getting weirder.

It's not Perlover's changes per se that fixed the issue.  I'm still debugging,
but near as I can tell, the issue is related to this...

In my vanilla cgi application, I have my homegrown objects like:

Vanilla::Foo
Vanilla::Bar

etc. In my Dancer application's lib directory I had copied them over like:

lib/
  App.pm
  Vanilla/
    Foo.pm
    Bar.pm

and so forth where, App.pm is my main file. App.pm calls 'Vanilla::Foo', 
'Vanilla::Bar', &c.  It is at this point that I can't use POSTed params. 
So in the course of debugging I rearranged my directory structure to be 
like:

lib/
  App.pm
  Foo.pm
  Bar.pm

and I consequently changed App.pm to now call 'Foo', 'Bar', and so on. And
then it is at this point that I can see and use POSTed params!

I don't think its my Vanilla::Foo code, because I'm not using any methods --
just calling the libraries at the top of App.pm .

Does anyone have any idea WTF is going on? I'm continuing to debug, next step
will be to actually use the 'Vanilla' libraries' methods and see what happens.

Thanks
GJ


More information about the Dancer-users mailing list