Re: [Mojolicious] Mojolicious debugging with perl -d

2016-12-05 Thread mongoostic
I could make request as follows: perl -d ./script/myapp.pl get -M POST -H 'Content-Type: application/x-www-form-urlencoded' -c 'user=username&password=thisspass' / auth Thanks you again! понедельник, 5 декабря 2016 г., 12:45:16 UTC+8 пользователь mongo...@gmail.com написал: > > Can I transfer f

Re: [Mojolicious] Mojolicious debugging with perl -d

2016-12-04 Thread mongoostic
Can I transfer form's params from command line with POST request? I read the doc and don't understand, how I can do it. Or for this I need use test's? I wouldn't trust "ctrl+c", because it just breaks the debugger at some > random point in the code (probably somewhere unhelpful inside the event

Re: [Mojolicious] Mojolicious debugging with perl -d

2016-12-04 Thread Dotan Dimet
You can make a POST request with the get command : http://mojolicious.org/perldoc/Mojolicious/Command/get But when your arguments get complicated, it might be best to just write a test - using Test::Mojo - and run that in the debugger: http://mojolicious.org/perldoc/Mojolicious/Guides/Growing#to

Re: [Mojolicious] Mojolicious debugging with perl -d

2016-12-04 Thread mongoostic
Thank you! It's work. For one GET request, for example. But, how I can send POST request? (I am testing code in module authentication) And moreover, how I can run and still application in perldebug mode, and from time to time, stopping him by "ctrl+c", set breakpoint watch vars, and continue app

Re: [Mojolicious] Mojolicious debugging with perl -d

2016-12-01 Thread Dotan Dimet
perl -d script/my_app get /route/to/controller Stepping through mojo code until it reaches your startup() method is tricky and time-consuming. The best way to avoid all that is to add the line $DB::single = 1; inside your startup() method code.