[Mojolicious] Mojolicious debugging with perl -d

2016-12-01 Thread mongoostic
Hi! I'am newbie in Mojo. Please, tell me, how I can run Mojolicious app (not lite), run in full perl debug mode (perl -d) with breakpoints, vars watch etc. p.s. the application which I need debugging have a main package, let's call him "MyPackage.pm" with function "startup {}", if this

Re: [Mojolicious] How to stop rendering after user error?

2016-12-01 Thread Alexbyk (subscriptions)
Actually, you're on the right way. But instead of calling render in controller (you'll get many duplicates of the same code), you better just leave only "die" there, and call render method from the hook. Smthng like this: # hook (you can also consider arount_action hook)

[Mojolicious] How to stop rendering after user error?

2016-12-01 Thread Peter Valdemar Mørch
Say in my controller I'm 5 levels deep and discover there is a problem with the user's input. I call: $c->render( template => 'errors/badValues', message => 'The value of foo cannot be "bar"', ); And now I want to stop the entire request right there. I guess the behaviour