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

IRC log for #mojo, 2015-04-04

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

All times shown according to UTC.

Time Nick Message
00:00 Grinnz because assigning to %req and passing it to a function passes a copy of its contents
00:00 Grinnz if you just use a reference, you're only passing the reference
00:02 Grinnz two other minor points: each is generally something to avoid (it does things internally to the hash) and you can use Mojo::JSON or even the json websocket event directly to decode the json natively
00:02 Grinnz https://metacpan.org/pod/Mojolicious::Controller#on
00:03 Grinnz i just discovered that last part recently heh
00:17 serentiy on(json) sub .. thats cool.  thank you
00:29 disputin joined #mojo
00:35 noganex joined #mojo
01:51 klapperl joined #mojo
01:56 Zoffix Was it here that someone was asking whether it made any difference between using #!/usr/bin/env perl vs #!perl?  I found that making a symlink to the executable with #!perl doesn't work properly, but with ../env it works fine.
02:02 Grinnz #!perl is only for the installer to rewrite it to the perl that installed it via cpan, iirc
02:14 noganex_ joined #mojo
02:38 punter joined #mojo
02:47 asarch joined #mojo
03:01 buu Grinnz: Its also a win32 thing
03:02 buu Its a little complicated
03:02 Grinnz yeah i remember that
03:02 Grinnz lol
03:03 buu #!echo 42
03:35 Zoffix Is it possible to use Test::Mojo with ::Lite apps? This is my app, but I've no idea how to tell Test::Mojo to use it for testing: https://github.com/zoffixznet/XTaTIK/
03:35 Zoffix This obviously doesn't work: https://github.com/zoffixznet/XTaTIK/blob/master/t/01-cat-traversal.t#L9
03:35 Zoffix "t/01-cat-traversal.t .. Can't find application class "XTaTIK" in @INC"
03:36 zackiv31 joined #mojo
03:36 Zoffix Ah: http://mojolicio.us/perldoc/Mojolicious/Guides/Growing#Testing
03:55 Grinnz yeah just need to require the script
03:57 basic6_ joined #mojo
05:04 kaare joined #mojo
06:21 dod joined #mojo
06:27 dod joined #mojo
07:06 _dave_ joined #mojo
07:39 dotandimet joined #mojo
07:57 Vandal joined #mojo
08:08 berov joined #mojo
08:12 sawtooth joined #mojo
08:27 cpan_mojo Mojolicious-Plugin-Riotjs 0.0203 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-Riotjs-0.0203
08:27 berov joined #mojo
08:49 sawtooth joined #mojo
09:11 dotandimet joined #mojo
09:54 sri jberger: no
10:29 alnewkirk joined #mojo
10:38 dustinm joined #mojo
11:00 punter joined #mojo
11:25 KCL joined #mojo
11:27 amon joined #mojo
11:54 cpan_mojo Mojolicious-Plugin-AssetPack 0.47 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-AssetPack-0.47
12:25 mattastrophe joined #mojo
12:35 Oleg joined #mojo
12:39 jberger damn, I need to figure out what to do about cpan_mojo :(
12:45 punter joined #mojo
12:57 trone joined #mojo
12:57 batman jberger: how about converting or using https://metacpan.org/pod/AnyEvent::Twitter::Stream ?
13:00 sh4 joined #mojo
13:02 dotandimet joined #mojo
13:47 mattastrophe joined #mojo
13:54 mattastrophe joined #mojo
14:04 asarch joined #mojo
14:16 Zoffix I wish Test::Mojo allowed to check for the number of elements... ->element_count('#products > li', 6, 'We should have only 6 products on this page');
14:17 Zoffix Which I currently wrote as ->element_exists_not('#products > li + li + li + li + li + li + li')
14:17 mattastrophe joined #mojo
14:19 * Zoffix tries the 'patches welcome' approach
14:26 batman Zoffix: how about using "li:nth-of-type(6)" ?
14:28 Zoffix I think it's still a backwards solution. I mean, what you wrote already has a bug :) It needs to be li:nth-of-type(7). It also doesn't solve if I want to see whether, say, there are 5 .foo elements on the page. Or test for whether there are more than 5 less than 5, etc.
14:28 Zoffix I'll submit a PR shortly. You guys decide whether to include it.
14:35 batman Zoffix: i agree it would be nice to have, but i'm not sure if it's worth it.
14:36 Zoffix worth what?
14:36 purl it has been said that worth is so hard to measure...
14:36 batman worth the code
14:38 batman one thing i've considered is asking for change on how text_is() works.
14:38 batman right now it returns "" if the element does not exist, but i've thought some times that undef might be more appropriate.
14:39 batman that would also scratch your itch, i suppose: $t->text_is("li:nth-of-type(7)", undef);
14:39 batman ^ note: that doesn't work as we speak
14:40 batman https://github.com/kraih/mojo/blob/master/lib/Test/Mojo.pm#L380
14:40 batman what do you think sri?
14:40 mst batman: no, that's still a backwards solution
14:41 batman mst: care to explain?
14:41 purl care to explain is probably DBIx::Class itself a subclass of ResultSet?
14:41 mst though having text_is DTRT would still be nice
14:41 mst batman: Zoffix already explained it
14:41 mst it doesn't capture the semantics of what he's doing
14:41 batman ok
14:42 batman not sure if my suggestion is *DTRT*
14:43 mst I think having it produce undef for nothing would make sense
14:43 mst I also don't think it would help zoffix at all
14:45 batman depends if you're just checking the number or checking the content of the other "li" i guess.
14:47 mst yes, and he already said which one of those he was doing :P
14:58 L0ck3D joined #mojo
14:58 L0ck3D Hello World
14:58 inokenty joined #mojo
15:06 Zoffix hai
15:07 inokenty_a joined #mojo
15:22 mattastrophe joined #mojo
15:32 gryphon joined #mojo
15:33 fhelmber_ joined #mojo
15:39 mattastrophe joined #mojo
15:57 inokenty_a joined #mojo
16:00 mattastrophe joined #mojo
16:04 Flying_Squirrel joined #mojo
16:12 inokenty_a joined #mojo
16:31 Grinnz jberger, what about cpan_mojo?
16:32 batman Grinnz: friendfeed is shutting down
16:33 Grinnz ah
16:33 Grinnz never used it
16:54 jberger batman: yeah, miyagawa just told me on twitter that its likely that they are going to port the stream to publish on twitter (@cpan_new) directly
16:54 jberger right now @cpan_new and cpan_mojo both pull from miyagawa's friendfeed stream
16:56 jberger and I could probably port that
16:56 jberger I'll probably use it at least as a starting point I suppose
17:19 jberger Zoffix: commented on your PR
17:22 jberger twice
17:30 Zoffix I didn't find where the Test::Mojo is being tested. So I didn't write tests.
17:33 Zoffix As for the utility of the addition... well, there's currently no sane way to check the number of elements matches what you're expecting.
17:34 Zoffix And the number of elements on the page corresponds to the number of things you expect the app to produce.
17:34 jberger so far, Test::Mojo is being "tested" by being used. I would suggest adding tests in say lite tests that use your test method
17:35 jberger when the new Test::More comes out, I do actually want to write unit tests for Test::Mojo
17:41 Grinnz who tests the tester???
17:42 Zoffix The real question is who tests the tester's tester!
17:47 xtetsuji_ joined #mojo
17:51 * pink_mist tests Zoffix
17:53 * Zoffix fails
17:53 pink_mist well that's a good thing - I was testing for cancer
17:55 jberger :o
17:55 jberger Zoffix might be an object that overloads boolean
17:56 jberger be sure you test that correctly!
18:07 melo joined #mojo
18:32 inokenty_a joined #mojo
18:44 inokenty-m joined #mojo
18:59 Grinnz DBM::Deep is pretty sweet
19:00 Zoffix wow.. in a year, I finally tried to visit meatcpan.org instead of metacpan.org
19:00 Zoffix $10 well spent...
19:02 Grinnz hahaha
19:02 memowe joined #mojo
19:03 mst look at your code ... now back to me ... you code is now made of BACON
19:04 ribasushi camel bacon \o/
19:14 berov joined #mojo
19:17 dotandimet joined #mojo
19:21 mattastrophe joined #mojo
19:37 jberger Zoffix: marcus was going to make a perl jobs site at meatcpan
19:44 mattastrophe joined #mojo
19:50 Zoffix What about jobs.perl.org? :)
19:51 jberger Zoffix: it was mostly a joke :)
19:58 melo joined #mojo
19:59 hernan604- joined #mojo
19:59 hernan604- hi!
19:59 Zoffix Hello!
19:59 hernan604- sri around ?
20:00 hernan604- i found a bug and want to submit a patch
20:00 Zoffix \o/
20:00 hernan604- \o/
20:00 jberger hernan604-: is it a security bug? If not submit a pull request
20:01 hernan604- not security
20:08 hernan604- done: https://github.com/kraih/mojo-pg/pull/5
20:15 hernan604- the bug is in Mojo::PG.
20:16 hernan604- i have many migrations and it stoped getting new ones at "9 up"
20:16 hernan604- it was not getting my "12 up" migration.
20:17 hernan604- Turns out the sorting function to get the latest migration was not numerically sorted. It sorted like: 1,10,11,2,3,4,5,6,7,8,9
20:18 jberger :o
20:18 hernan604- :p
20:23 jberger asciibetical sorting of numbers is the bane of all that is good and decent in this world
20:30 hernan604- im gonna submit same fix to mojo-mysql
20:40 hernan604- batman, sri ^^
20:45 hernan604- have a great weekend guys
20:57 berov joined #mojo
21:04 Grinnz_ joined #mojo
21:31 Grinnz joined #mojo
22:55 Zoffix w00t... found a new bug and my issue number is 777 :D
22:55 * Zoffix wonders what he won
23:33 Adura An insecure file.
23:36 Zoffix :(
23:38 mattastrophe joined #mojo
23:39 jberger a Nigerian Prince will offer you a large reward
23:40 Zoffix \o/

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