The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2017-07-25

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:27 kiwiroy joined #mojo
00:42 kiwiroy joined #mojo
00:58 kiwiroy joined #mojo
01:23 marty joined #mojo
02:03 noganex joined #mojo
02:37 karjala_ joined #mojo
04:07 schelcj joined #mojo
04:19 sh14 joined #mojo
04:46 schelcj joined #mojo
05:54 eseyman joined #mojo
05:59 brunoramos joined #mojo
06:08 inokenty-w joined #mojo
06:17 dod joined #mojo
06:21 suede joined #mojo
06:25 CHYC joined #mojo
06:25 Phil21 joined #mojo
06:25 howitdo joined #mojo
06:25 jacoby joined #mojo
06:25 jnbek joined #mojo
06:25 tyldis joined #mojo
06:25 mudler joined #mojo
06:25 dabudabu joined #mojo
06:25 meredith joined #mojo
06:25 arcanez joined #mojo
06:25 stephan48 joined #mojo
06:25 kamyl joined #mojo
06:25 Gedge joined #mojo
06:25 bc547 joined #mojo
06:25 zach joined #mojo
06:25 abracadaniel joined #mojo
06:25 mpapec joined #mojo
06:25 michael joined #mojo
06:25 diegok joined #mojo
06:25 klapperl_ joined #mojo
06:25 robinsmidsrod joined #mojo
06:25 go|dfish joined #mojo
06:25 cstamas joined #mojo
06:25 TBSliver joined #mojo
06:25 mrallen1 joined #mojo
06:25 sri joined #mojo
06:25 [0xAF] joined #mojo
06:25 jantore joined #mojo
06:25 odc joined #mojo
06:25 batman joined #mojo
06:25 a6502 joined #mojo
06:45 HtbaaPi joined #mojo
06:46 dod joined #mojo
06:47 AndrewIsh joined #mojo
06:47 bianca joined #mojo
06:50 dod joined #mojo
06:58 Vandal joined #mojo
07:19 stryx` joined #mojo
07:30 trone joined #mojo
07:53 FROGGS joined #mojo
07:53 FROGGS aloha
07:54 FROGGS I've skimmed the source and looked into several plugins on cpan but did not find information about how to write a plugin that adds more http methods...
07:55 FROGGS ist it possible to add qw(HEAD LINK UNLINK) via a plugin, to extend a REST API?
08:00 FROGGS (I know about the magic of HEAD, but it would be nice to be able to map it directly to a perl sub that does something awesome)
08:16 nicomen $ perl -wl -Mojo -E 'a("/" => sub { my $c = shift; $c->render( text => "Method: " . $c->req->method ); } )->start' get -M LOL '/'
08:16 nicomen Method: LOL
08:17 nicomen ?
08:19 pink_mist FROGGS: https://metacpan.org/pod/Mojolicious::Guides::Routing#HTTP-methods <-- use ->any(['HEAD'])-> or so
08:19 FROGGS ohh!
08:19 pink_mist actually, HEAD should already work for a GET route
08:20 pink_mist afaict
08:20 FROGGS yes, but I want to route it differently
08:30 nicomen $r->_generate_route(HEAD => … ) might work
08:35 meredith joined #mojo
08:41 FROGGS I sumed it up: https://gist.github.com/FROGGS/d14fb9f9b6cd6f33acb26cc11cf7ffe2
08:42 FROGGS TL;DR: on cannot dispatch HEAD requests to another handler, it will do what GET does for that URL and will output the HTTP headers only
08:42 FROGGS but anything else works, which is quite nice
08:43 Kundun joined #mojo
08:46 rshadow joined #mojo
08:46 prg joined #mojo
09:18 bianca joined #mojo
10:04 bjakubski joined #mojo
10:08 marcus agh, vs code is driving me nuts. Why isn't it using the credentials cache from my git config? :'(
11:00 tchaves joined #mojo
11:13 coolo joined #mojo
12:14 petru_ joined #mojo
12:18 Pyritic joined #mojo
12:28 dod joined #mojo
12:29 itaipu joined #mojo
12:30 dod1 joined #mojo
12:36 gizmomathboy joined #mojo
13:03 petru_ joined #mojo
13:04 cosimo joined #mojo
13:22 gryphon joined #mojo
13:34 marty_ joined #mojo
13:35 perlpilot joined #mojo
13:38 bianca joined #mojo
14:14 sri this could use more reviewers https://github.com/kraih/mojo/pull/1112
14:16 sri as time goes on, i'm getting the feeling it might not succeed after all
14:38 FROGGS joined #mojo
14:39 cosimo joined #mojo
14:47 petru_ joined #mojo
15:21 petru_ how can I get the filename of an attachment sent via a form?
15:23 petru_ found it, it's $file->filename
15:23 preaction petru_: http://mojolicious.org/perldoc/Mojo/Upload#filename
15:32 perlpilot joined #mojo
15:37 PryMar56 joined #mojo
15:50 bianca joined #mojo
16:10 petru_ is there a way to run only one test file instead of running all when doing perl app test?
16:11 preaction "mojo help test" says you can specify the test files to run on the command line
16:11 batman petru_: have you tried adding the test file afterwards?
16:13 petru_ preaction: thanks
16:13 sh14 joined #mojo
16:42 marty joined #mojo
16:46 zivester joined #mojo
16:51 petru_ joined #mojo
16:52 itaipu joined #mojo
16:52 petru_ how can a post request inside tests return undef?
16:52 preaction there are 2xx http responses for no content/body
16:53 petru_ The test fails, it says got: undef expected: '200'
16:56 preaction it got undef for a status code. maybe print the body out? something like ->or( sub { diag shift->tx->res->body } )
16:58 petru_ thanks
16:59 petru_ this is the output https://perlbot.pl/p/nfxmuo
17:00 petru_ https://perlbot.pl/p/uanth8
17:00 petru_ the source code for the tests that fail
17:01 preaction so you got a premature connection close. does the endpoint do something to close the connection?
17:02 petru_ no
17:09 petru_ preaction: if I reset cookies in tests, will the connection be closed?
17:10 petru_ s/cookies/session/
17:10 preaction i don't know, i've never done that
17:32 schelcj joined #mojo
17:34 kes joined #mojo
17:34 kes Hi.
17:35 kes Does this proposition looks reasonable: http://paste.scsys.co.uk/564680
17:35 kes this will allow setup default selected options more easily
17:35 kes i thing
17:35 kes I think
17:40 schelcj joined #mojo
17:43 CandyAngel \
17:47 CandyAngel Oops :
17:53 schelcj joined #mojo
18:15 schelcj joined #mojo
18:38 dod joined #mojo
18:39 bianca joined #mojo
18:50 perlpilot joined #mojo
18:56 mib_jnyhd1 joined #mojo
19:13 Lee_ joined #mojo
20:00 petru_ joined #mojo
20:23 jabberwok https://github.com/kraih/mojo/pull/1113   might be one way to resolve #1094.  i believe suitable run through perltidy.
20:47 sri jabberwok: you broke tests
20:48 sri i kinda like the solution actually, but i would name it something else
20:48 sri anyone could actually add "special" static files there
20:49 sri what to name it i do not know
20:49 sri you should clean up the code
20:50 sri it's really ugly
20:51 petru_ how can I debug a not found error?
20:51 sri why would you use an uppercase variable in such a small scope? https://github.com/kraih/mojo/pull/1113/files#diff-82f49109a8d5f4092dc2329ea063f09aR17
20:51 petru_ when running the app everything works fine, but in tests instead of 200, I get 404
20:54 jabberwok agreed. -- i merely kept $PUBLIC from before, that should change. I'll clean things up.
20:55 jberger jabberwok neat
20:55 sri jabberwok++ # good idea
20:55 * sri cracks the whip
20:59 petru_ $if_login->get('/submission/:id')->name('show_submission')->to('submission#show'); this is the route and the test looks like this: $t->get_ok('/submission/1')->status_is(200);
20:59 petru_ the response is the blue mojolicious page when a route is not found
21:01 preaction petru_: what does the log say?
21:05 rshadow joined #mojo
21:05 petru_ http://paste.debian.net/978146/ how can I write the whole output to a file?
21:05 petru_ doing carton exec perl super_secret test ../t/Controller/submission.t > output.txt does not work
21:08 petru_ I think this is the relevant part: http://paste.debian.net/978147/
21:16 petru_ I have 2 similar routes http://paste.debian.net/978149/ and I test both of them and only one fails: http://paste.debian.net/978150/
21:23 petru_ found the problem, the code was failing somewhere else. I don't know why it failed without an error
21:24 sri Grinnz: since you're using sshfs, how do you search in project without waiting for hours?
21:24 Grinnz git grep
21:24 purl git grep is SO FAST
21:25 Grinnz true :P
21:40 zerah joined #mojo
22:12 bianca joined #mojo
22:12 stryx` joined #mojo
22:29 zerah joined #mojo
22:31 sri jabberwok: don't make it complicated with assets and stuff
22:32 sri just plain strings, shortname to absolute path mapping, no more
22:32 sri should take pretty much no code
22:32 sri and squash your commits
22:45 marty joined #mojo
23:43 jabberwok ok
23:56 bianca joined #mojo

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary