Camelia, the Perl 6 bug

IRC log for #mojo, 2012-08-05

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

All times shown according to UTC.

Time Nick Message
00:31 asarch joined #mojo
01:03 jnap joined #mojo
01:11 asarch joined #mojo
01:35 sri hmm, looks like perl 5.18 will completely break mojolicious http://www.cpantesters.org/cpan/report​/2778c2a6-dde0-11e1-8d85-1d2585400d13
01:43 asarch joined #mojo
01:48 mire joined #mojo
02:07 sri confirmed, we'll have to make a breaking change there because perl changes
02:32 xaka1 hm...what has been changed actually?
02:37 Psyche^ joined #mojo
02:53 sri you can't assign data structures to %ENV anymore
02:54 sri $ENV{FOO} = {lalala => 123}
02:54 sri they stringify on assignment, instead of on fork
02:55 sri the mojolicious fix is rather simple and breaks one unit test... i guess it's not as bad as i thought
02:56 xaka1 so there is no exceptions or asserts when you try to assign something else but string to %ENV? they just silently do it? oh ((
02:56 asarch joined #mojo
03:03 noganex joined #mojo
04:18 tetraodontidae joined #mojo
05:03 ispy_ joined #mojo
06:04 ispyhumanfly joined #mojo
06:45 Vandal joined #mojo
07:19 Britzel_ joined #mojo
07:58 beyondcreed joined #mojo
08:28 Leandr joined #mojo
09:06 Mad_Dud guys, it this one easy to solve? `mojo version` results in: Perl API version v5.14.0 of Digest::SHA does not match v5.16.0 at /usr/lib/perl5/core_perl/DynaLoader.pm line 213.
09:10 crab install a new Digest::SHA?
09:10 Mad_Dud 2.13?
09:13 crab dunno, my Digest::SHA is 5.47 but i run v5.12.3
09:14 Mad_Dud ok, so SHA1 and SHA are to different elements..
09:14 Mad_Dud by bad.
09:23 Mad_Dud cpan says it's up to date, but it still wont work.. can i do anything else about it?
09:29 amirite joined #mojo
09:46 d4rkie joined #mojo
09:47 crab google for the error message
10:40 Mad_Dud oe
10:40 Mad_Dud okey
11:15 crab found anything?
11:18 fhelmber_ joined #mojo
12:04 ispy_ joined #mojo
12:23 mire joined #mojo
12:53 amirite_ joined #mojo
13:01 amirite joined #mojo
13:15 amirite joined #mojo
13:25 amirite joined #mojo
13:34 amirite joined #mojo
13:45 gryphon joined #mojo
13:47 jamesw joined #mojo
13:50 asarch joined #mojo
14:07 amirite joined #mojo
14:18 berov joined #mojo
14:22 amirite joined #mojo
14:25 Britzel joined #mojo
14:32 Leandr joined #mojo
14:34 amirite joined #mojo
14:43 amirite joined #mojo
14:49 amirite_ joined #mojo
14:57 amirite joined #mojo
15:07 daniel_ joined #mojo
15:10 amirite joined #mojo
15:10 sri hmm
15:11 sri the way Mojo::Server/Mojo::UserAgent and Test::Mojo do app discovery for lite apps needs to be completely redesigned
15:12 sri i think it can be done with very little breakage
15:18 amirite joined #mojo
15:27 berov hi,
15:27 berov I was wandering the following:
15:27 berov Scenario: I have a robot based on Mojo::UserAgent
15:27 berov I run it locally to test it with a local copy of the site which my robot visits.
15:27 berov The site uses cookies for sesion and authentication - ar egular PHP site with PHPSESSID :).
15:29 berov the local site always issues an new PHPSESSID
15:30 berov hm I have received warnng for flooding when i posted my message here
15:31 berov can you read it all?
15:31 Vandal yes
15:31 berov ah ok, any idea how to debug this?
15:32 sri hahahaha
15:32 sri "can you read it all?"
15:32 berov note that when I log via regular browser
15:33 sri how are we supposed to know if that's all! ;p
15:33 berov it works fine
15:33 amirite joined #mojo
15:33 bjoernfan "the local site always issues an new PHPSESSID" does not sound like the last line to me :P
15:33 berov last sentence "the local site always issues an new PHPSESSID" :)
15:33 bjoernfan well then
15:33 bjoernfan :P
15:34 * sri wonders if the singleton app should be stored in Mojo->singleton
15:35 berov ?
15:35 bjoernfan berov: I'm not sure of how to handle sessions/cookies in UserAgent, sorry.
15:35 berov it works automagically :)
15:36 Vandal are you sure?
15:36 bjoernfan But it apparently it doesn't work for you?
15:36 marcus yeah, it should just work.
15:36 berov well when i point the robot to the real site
15:36 bjoernfan What you're saying sounds like when you forgot about start_session(); in PHP.
15:36 berov it authenticates
15:37 berov hm I was thinking about this but it is the same locally and there
15:37 bjoernfan And if it works in firefox or whatever browser, that's probably not it.
15:37 berov may be there is some rediract trough which UA passes
15:38 berov It works in FF
15:39 berov how can I enable Mojo::UserAgent::DEBUG but not seeing the req and res bodies
15:39 berov is that possibe
15:39 berov I want to see only headers
15:39 berov when i switch DEBUG on
15:39 berov how to do this?
15:40 berov if you point me to the source when i can just cut off the bodies that would work too
15:42 berov I mean not warning on the STDOUT
15:42 berov I see this: warn "< $chunk\n" if DEBUG;
15:44 amirite joined #mojo
15:46 berov hm commenting this cuts off all output :)
15:50 berov sri, here is my suggestion for a new featchure ;)
15:50 berov warn "> $chunk\n" if DEBUG and $chunk !~/<\w+/
15:51 berov warn "< $chunk\n" if DEBUG and $chunk !~/<\w+/
15:51 berov Something like "Print only headers" when debugging
15:52 amirite joined #mojo
15:53 sri i don't like it
15:53 sri if you want custom debug output just use the read/write events in Mojo::IOLoop::Stream
15:53 sri you don't have to hack the source, the hooks are already there
15:53 berov If i knew they exist :)
15:54 berov aha ok thanks
15:54 berov I will look there
15:54 berov may be that was the answer of my question
15:54 sri there's a unit test demonstrating it somewhere
15:54 berov will find it, thanks
15:55 sri https://github.com/kraih/mojo/blo​b/master/t/mojo/user_agent.t#L256
15:57 berov ah will try it right away ... so I needed to hack the source to understand how not to - pretty obvious :)
15:57 berov thanks again
15:59 berov wow, did I drive them away...
16:00 sri that's what you get for flooding the channel!
16:00 amirite joined #mojo
16:01 berov :)
16:03 Netfeed joined #mojo
16:06 Leandr joined #mojo
16:06 Britzel joined #mojo
16:06 Patterner joined #mojo
16:06 rem_lex joined #mojo
16:06 chansen joined #mojo
16:06 mike_ joined #mojo
16:06 human39 joined #mojo
16:06 inokenty joined #mojo
16:06 bjoernfan joined #mojo
16:06 baton8 joined #mojo
16:06 nicomen joined #mojo
16:06 dwierenga joined #mojo
16:06 espent joined #mojo
16:06 heytrav joined #mojo
16:06 marcus joined #mojo
16:06 espen joined #mojo
16:06 Mikey joined #mojo
16:06 migo joined #mojo
16:06 nuba joined #mojo
16:06 bobkare joined #mojo
16:06 Annihitek joined #mojo
16:06 Ulti joined #mojo
16:06 gabiruh joined #mojo
16:06 spacebat joined #mojo
16:08 amirite joined #mojo
16:13 mire joined #mojo
16:27 d4rkie joined #mojo
16:28 jamesw joined #mojo
16:29 sri interesting, the app detection fix also makes unit tests run noticeably faster
16:42 ispyhumanfly joined #mojo
16:48 xaka1 joined #mojo
16:55 daniel_ joined #mojo
17:07 xaka joined #mojo
17:15 Leandr joined #mojo
17:17 batman since it's been summer and all, i haven't upgraded mojolicious since 2.85, and i'm running into issues doing SSL requests now.
17:18 batman it seems to be resolved when i install IO::Socket::SSL and IO::Socket::IP
17:18 batman but should there be some croak()ing when those modules are not properly installed?
17:28 stephan48 batman: it was an issue with older versions
17:29 batman what kind of issue? i thinking if($proto eq 'SSL' and !CORRECT_MODULE_LOADED) { croak "Need to install ...." }
17:29 batman something like that...
17:30 GitHub176 joined #mojo
17:30 GitHub176 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/21​11684fe5b986d00ec5e8abef405d414aa34086
17:30 GitHub176 [mojo/master] fixed Perl 5.17.3+ compatibility - Sebastian Riedel
17:30 GitHub176 left #mojo
17:30 sri tempire, marcus, crab: please test, i'm almost certain i've introduced new bugs
17:31 sri for the singleton test application i went with Mojo::UserAgent->app(MyApp->new) btw
17:32 sri that sets a default application for all Mojo::UserAgent instances, that can be changed with instance specific $ua->app(MyApp->new) calls
17:32 stephan48 batman: issues with how these modules intervined and worked together with mojo also some internal changes in the modules
17:33 batman stephan48: i don't mind that they are required, i'm just suggesting that Mojo::UserAgent should let the user know that they are indeed required
17:33 stephan48 did you have one of these modules installed before or IO::Socket::INET6?
17:34 batman i had IO::Socket::INET6 installed
17:34 batman https://gist.github.com/4b78a5afbf910508704d <-- output from cpanm and friends
17:35 sri batman: it already does tell you, you're just not checking
17:35 asarch joined #mojo
17:35 batman not checking? my unittest failed with an empty respons
17:36 sri croak would be stupid... it's a total no go for non-blocking apps
17:36 batman i tried: diag Dumper($ua->get('https://google.com')->res) and it gave me a response object without much data inside it
17:36 batman ok. warn() or whatever...
17:37 sri sorry, shouldn't have gotten involved, too busy with the bugfix
17:37 batman would it have shown if i had set MOJO_LOGLEVEL ?
17:46 GitHub3 joined #mojo
17:46 GitHub3 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/c0​a2e3128f55849901e76a71a734a2cdf91fe2c3
17:46 GitHub3 [mojo/master] test default application - Sebastian Riedel
17:46 GitHub3 left #mojo
18:06 amirite joined #mojo
18:07 asarch joined #mojo
18:14 amirite joined #mojo
18:21 amirite_ joined #mojo
18:27 amirite joined #mojo
18:27 GitHub123 joined #mojo
18:27 GitHub123 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/d2​f59fdcc6dc2c67ce2665f4fc6ca92a819ccdbe
18:27 GitHub123 [mojo/master] fixed backwards compatibility issue - Sebastian Riedel
18:27 GitHub123 left #mojo
18:28 sri ok, that should be almost 100% backcompat again
18:30 sri i think there are sadly still quite a few old style scripts out there
18:30 sri as in "$ENV{MOJO_APP} = 'MyApp'; Mojolicious::Commands->start;"
18:35 amirite joined #mojo
18:39 asarch joined #mojo
18:39 phillipadsmith joined #mojo
18:40 Vandal joined #mojo
18:41 Vandal joined #mojo
18:47 GitHub0 joined #mojo
18:47 GitHub0 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/2b​9f741e7615b9c890c08e1691313f6d3cd13fd8
18:47 GitHub0 [mojo/master] test Mojo::UserAgent default application - Sebastian Riedel
18:47 GitHub0 left #mojo
18:48 amirite joined #mojo
18:49 mire joined #mojo
18:55 amirite joined #mojo
19:02 amirite joined #mojo
19:14 amirite joined #mojo
19:14 GitHub44 joined #mojo
19:14 GitHub44 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/d0​64318724c047e889ec4572ef211d5d257d92dd
19:14 GitHub44 [mojo/master] better default application tests - Sebastian Riedel
19:14 GitHub44 left #mojo
19:16 sri does that look ok? http://mojolicio.us/perldoc/Mojo/UserAgent#app
19:21 amirite joined #mojo
19:36 amirite joined #mojo
19:43 amirite joined #mojo
19:52 amirite joined #mojo
19:58 amirite_ joined #mojo
20:04 msoulier joined #mojo
20:05 amirite joined #mojo
20:08 berov sorry to not getting it but where I can look for useful examples with Mojo::UserAgent->app;
20:08 berov What is it for?
20:09 berov I mean the big picture
20:09 sri if you don't already know what it does the discussion is not important for you ;)
20:09 berov no discussion just info
20:10 berov enlightment?
20:10 berov testing?
20:13 berov ah getting the app in which Mojo::UserAgent is instanciated... may be of some use...
20:17 daniel_ joined #mojo
20:19 amirite joined #mojo
20:32 amirite joined #mojo
20:35 lisantra joined #mojo
20:35 lisantra joined #mojo
20:36 lisantra I've setup my mojo lite app under my docroot and am running it on Apache2 using mod_perl/Plack
20:36 lisantra But, I always get a 404 on any routes
20:37 lisantra Haven't found much on the web via google, either
20:37 lisantra I have app.psgi in /public (my Apache docroot) and the rest in the parent directory (which we'll call / here)
20:39 berov wrong Alias in httpd.conf ?
20:39 berov or Location
20:39 lisantra I used a Location
20:39 lisantra let's see...
20:40 asarch joined #mojo
20:40 lisantra I have the SetHandler well enough
20:41 lisantra and PerlSetVar psgi_app /srv/www/test.local/public/app.psgi
20:41 lisantra $ENV{MOJO_HOME} is /srv/www/test.local
20:43 amirite joined #mojo
20:53 GitHub162 joined #mojo
20:53 GitHub162 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/d2​3b01df8c5bdab1ff482e72749d665380dbeaec
20:53 GitHub162 [mojo/master] fixed small excutable detection bug - Sebastian Riedel
20:53 GitHub162 left #mojo
20:53 amirite joined #mojo
21:03 amirite joined #mojo
21:05 lukep joined #mojo
21:06 rem_lex|pivo joined #mojo
21:09 perlite_ joined #mojo
21:13 ryanc joined #mojo
22:07 GitHub139 joined #mojo
22:07 GitHub139 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/c0​cd488106c945a01c8efd824b0a41877d22b47d
22:07 GitHub139 [mojo/master] let Test::Mojo handle instantiation - Sebastian Riedel
22:07 GitHub139 left #mojo
22:08 sri think i'll leave the return value of Mojo::UserAgent->app($app) undefined for now
22:09 sri not like it will get used for anything else than testing :)
22:18 GitHub3 joined #mojo
22:18 GitHub3 [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/c4​f3ac64b79696e2b3e7d0b119b28a5f6d22c574
22:18 GitHub3 [mojo/master] explain default application behavior - Sebastian Riedel
22:18 GitHub3 left #mojo
22:29 sri FUCK IT! WE'LL DO IT LIVE!
22:55 berov left #mojo
22:56 tempire sri: changes make my tests hang
22:56 sri /o\
22:56 tempire offending line: my $t = Test::Mojo->new('MojoFull')->app(schema => $schema);
22:57 tempire works if I separate into two statements
22:57 sri umm, wat?
22:57 sri ->app(schema => $schema);
22:57 sri that makes no sense
22:57 tempire passing an attribute into the app
22:58 sri wat?
22:58 tempire https://github.com/tempire/MojoExam​ple/blob/master/lib/MojoFull.pm#L5
22:58 sri we never ever supported that... ever!
22:59 * sri can hardly stop facepalming
22:59 * tempire grins
22:59 tempire It's a good idea to be able to pass state into an app for testing.
22:59 sri you can do that
23:00 sri $t->app->schema->($schema);
23:00 sri that's perfectly fine
23:00 sri has like dozens of unit tests
23:01 tempire does the job.  but boo for more multiple lines of code.
23:01 sri http://mojolicio.us/perldoc/Test/Mojo#app
23:01 zivester joined #mojo
23:01 sri pasing arbitrary arguments to ->app() makes absolutely no sense, how did you get there?
23:02 tempire it's expected because of Mojo::Base -base
23:03 tempire or Mojo::Base anything
23:03 sri but app() is a simple getter/setter for an application
23:03 sri it would be an attribute if it didn't have to propagate to Mojo::UserAgent
23:06 sri https://github.com/kraih/mojo/blob/0d571a99e6bc2​dc8d3e97d62fc8073f7198b505c/lib/Test/Mojo.pm#L23
23:06 sri it also didn't work in our last release
23:07 sri https://github.com/kraih/mojo/blob/e079f36d51fc7​e068fa2e5e480b78f08da5c7e8c/lib/Test/Mojo.pm#L23
23:07 sri or even in 3.0
23:08 sri https://github.com/kraih/mojo/blob/7321e4c7b83a1​9286b3309df53fc6d4d2e7460f0/lib/Test/Mojo.pm#L39
23:08 sri or 2.0
23:08 tempire strange.  works through 3.20
23:08 tempire not in 3.21, though
23:09 sri you mean it never complained, but surely it never actually worked
23:10 tempire likely
23:10 sri not that the Test::Mojo->app() code actually changed in 3.21
23:10 tempire was picking up the default db from previous tests
23:10 sri haha
23:10 * tempire curses state
23:11 sri what it actually did was try $t->ua->app(schema->new)
23:11 sri previous versions were wuite liberal there
23:12 sri it prolly fell back to a default app thingy and kinda worked
23:16 tempire I took a look at zeromq
23:16 tempire that's somewhat what I was talking about. doesn't really force you into anything, just covers some basic ideas and lets you build on it.
23:18 sri i'm actually not a zeromq fan
23:19 tempire why not?
23:19 sri it's just a hard to use transport layer with message framing
23:20 sri and for what little it does it is too complex
23:25 sri i love dead simple elegant solutions like redis :)
23:32 sri oh, mojolicious 3.21 is tag number 222 \o/
23:36 sri btw. if anyone wants to improve the new detection code... knock yourself out!
23:37 sri if it created new bugs there is no going back, we'll just have to deal with them, since perl 5.17.3 the old code is completely invalid
23:41 sri i would really like to kill the automagic config file naming code
23:41 sri https://github.com/kraih/mojo/blob/mast​er/lib/Mojolicious/Plugin/Config.pm#L44
23:42 sri pretty much all those MOJO_APP/MOJO_EXE special cases are there to make that one little feature work
23:42 sri but i guess most apps actually depend on it

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