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

IRC log for #mojo, 2014-04-02

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

All times shown according to UTC.

Time Nick Message
00:01 jberger hmmm well that was fun while it lasted :-/
00:01 jberger setting MOJO_HOME breaks EVERYTHING!
00:01 sri told you ;p
00:02 sri it's a HUUUUUUGE can of worms you're opening
00:02 rem_lex|pivo joined #mojo
00:02 sri the MAX_* env vars should be fun too... when parsing fails in fun ways
00:03 sri MOJO_CONFIG should also make quite a few tests go bonkers
00:03 sri and MOJO_MODE... lol!
00:03 jberger there would need to be some centralized environment clearing file which gets included in each test file
00:03 jberger it would be UGLY
00:04 sri yes
00:04 jberger close as "wont fix" then eh?
00:04 sri either way you have my support
00:05 jberger I think its a worthy goal, but then again, I think its high effort low reward
00:05 jberger a candidate for GSOC maybe?
00:06 sri actually, i phrased that wrong... an ugly solution does not have my support :)
00:07 sri maybe an FAQ answer
00:07 sri "Do i need to clean my environment before upgrading Mojolicious?"
00:08 jberger without the ugly solution it's incredibly high effort for the same low reward
00:08 sri think i closed the last two or so similar issues with WONTFIX
00:08 tianon people really run the mojo tests with MOJO_* env vars set and expect things to _not_ break? o.O
00:09 sri yea, i think it's a bit of a common sense problem
00:09 sri certainly there are env vars that will make perl core tests break
00:11 good_news_everyone joined #mojo
00:11 good_news_everyone [mojo] jberger deleted test_env at b6b59c0: http://git.io/mgxS8w
00:11 good_news_everyone left #mojo
00:12 sri haha, i recognize that function from Mojo::JSON https://metacpan.org/source/TOKUHIROM/PSON-0.01/lib/PSON.pm#L275
00:13 sri https://github.com/kraih/mojo/blob/master/lib/Mojo/JSON.pm#L273
00:13 tianon if you're going to borrow, borrow from the best :)
00:16 aggrolite joined #mojo
00:20 jberger sri: http://pastie.org/8987314
00:31 jack joined #mojo
00:32 sri i'd place it below this http://mojolicio.us/perldoc/Mojolicious/Guides/FAQ#Which_versions_of_Perl_are_supported_by_Mojolicious
00:33 sri "non-standard environment" sounds like it could be misunderstood
00:33 * sri shrugs
00:33 sri but i don't have a better idea either
00:40 * sri thinks minion might now actually be usable
00:41 * sri releases a new version
00:42 s you know how everyone's building parts of the web
00:43 s why don't we just duct tape it all together and hit play?
00:43 s that would be way more exciting
00:43 s Becooos the world is Rooound
00:44 s it's like tubes for pumping blood, but the blood is not really flowing cause the wrong stuff is at the top of the pyramid
00:45 s also where in the perl world can I find "my people"?
00:46 s cheers everyone
00:46 s it's amazing where we got to
00:46 s my path is paved with your brilliances
00:51 s the number 3 is more creative because it puts an asymmetry into your head that may result in new connections...
00:52 tianon joined #mojo
00:59 laouji joined #mojo
01:08 sri jberger: maybe one of the beginners here has some feedback on the FAQ answer
01:15 jberger sri/all: ok here's a second take, which takes a few more pains to explain what I mean by environment: http://pastie.org/8987402
01:15 sri that sounds very good
01:15 * jberger passes the pipe to s
01:16 sri i think i use C<MOJO_*> in the docs when referring to a prefix
01:16 sri aside from that +1 from me
01:16 jberger ok, can do
01:16 sri and the formatting might be off a little
01:17 sri we don't end sentences with dot newline
01:17 sri the "The" looks suspicious
01:17 jberger how many characters do you like per line?
01:18 sri 79
01:18 sri perltidy sometimes uses 80 for whatever reason, but if i can i stick to 79 always
01:19 jberger is there a perltidy vim plugin?
01:21 sri i used a keymap
01:21 sri perltidy does not tidy pod though
01:22 good_news_everyone joined #mojo
01:22 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/m7ZUXQ
01:22 good_news_everyone mojo/master fd8aa8b Sebastian Riedel: link to .perltidyrc
01:22 good_news_everyone left #mojo
01:22 jberger my ocd is usually better than perltidy tbh :-) (for my own projects of course)
01:23 sri nnoremap <Leader>t mz:%!perltidy -q<CR>'z:delmarks z<CR>
01:23 * jberger is never going to learn vim :-(
01:24 good_news_everyone joined #mojo
01:24 good_news_everyone [mojo] jberger pushed 1 new commit to master: http://git.io/FvigzA
01:24 good_news_everyone mojo/master 02aaf14 Joel Berger: Add FAQ about testing environment. Closes #608
01:24 good_news_everyone left #mojo
01:27 sri jberger++
01:27 laouji joined #mojo
01:30 sri testing minion with oneliners is quite fun :)
01:31 sri MOJO_LOG_LEVEL=debug perl -Mojo -E 'plugin Minion => {uri => q{mongodb://127.0.0.1:27017/minion_test}}; app->minion->add_task(test => sub { say "TESTING!"; sleep 2 }); app->start' minion worker
01:32 sri MOJO_LOG_LEVEL=debug perl -Mojo -E 'plugin Minion => {uri => q{mongodb://127.0.0.1:27017/minion_test}}; app->minion->enqueue("test")'
01:32 jberger sri++ # https://github.com/jberger/dotfiles/commit/e0f714d6dc1410b19d7c2e404d3a59beee74e526
01:32 sri MOJO_LOG_LEVEL=debug perl -Mojo -E 'plugin Minion => {uri => q{mongodb://127.0.0.1:27017/minion_test}}; app->start' minion job
01:32 sri for future reference ;p
01:32 jberger I can haz perltidy
01:33 sri \o/
01:33 sri TIDY ALL THE THINGS
01:33 hotsnow joined #mojo
01:34 * jberger has almost no idea what that vim-fu does
01:34 * jberger is a recovering gedit user
01:35 * sri is an atom user now
01:35 * jberger wnatz teh atomz but no haz teh mac
01:36 jberger I even have an invite and everything :-(
01:36 * jberger takes out his aggression on purl
01:38 BenGoldberg joined #mojo
01:41 klapperl joined #mojo
01:42 jberger sri: last thing
01:44 purl rumour has it last thing is planned for the final 2.2 version, first thing depends on a lot of different things
01:44 shmuel joined #mojo
01:44 rem_lex joined #mojo
01:44 jberger "So should Mojolicious enforce that helpers cannot start with digits, control characters or punctuation? Or does documentation need to change?" # https://github.com/kraih/mojo/issues/610#issuecomment-39261138
01:44 sri no opinion
01:44 BenGoldberg joined #mojo
01:44 jberger it seems that the user has stumbled on a Perl "feature"
01:44 jberger I'm not sure Mojolicious should care about it
01:53 jberger I think at one point I knew that esoterica about identifiers which are exempt from package
01:54 * jberger wonders why people define functions like _
01:55 d4rkie_ joined #mojo
01:55 jberger batman, you around?
01:55 jberger convos question
02:28 cpan_mojo Mojo-Downloader 0.2 by TOMORROW - http://metacpan.org/release/TOMORROW/Mojo-Downloader-0.2
02:29 laouji joined #mojo
02:43 sri presenting all this job queue information on the command line is harder than i thought
02:45 sri http://pastie.org/8987513 # what i got so far
03:03 laouji joined #mojo
04:20 inokenty joined #mojo
04:21 disputin joined #mojo
04:46 d4rkie joined #mojo
05:03 laouji joined #mojo
05:49 doby joined #mojo
06:17 Eke- joined #mojo
06:26 sujithm joined #mojo
06:32 denisboyun joined #mojo
06:39 dod joined #mojo
06:50 dod joined #mojo
07:00 eseyman joined #mojo
07:03 Dandre joined #mojo
07:21 basiliscos joined #mojo
07:23 sujithm joined #mojo
07:40 trone joined #mojo
07:54 laouji joined #mojo
07:56 hummeleBop joined #mojo
08:05 sujithm joined #mojo
08:05 basiliscos1 joined #mojo
08:10 punter joined #mojo
08:13 fhelmber_ joined #mojo
08:23 nic wow, looking good
08:32 Vandal joined #mojo
08:38 Negor|3 joined #mojo
08:38 Negor|4 joined #mojo
08:39 edestler joined #mojo
09:02 batman jberger: I'm home in 40 min I hope...
09:02 batman What's up?
09:04 D4RK-PH0ENiX joined #mojo
09:19 doby joined #mojo
09:27 stephan48 how would it be possible for text_is to not find a element previously found by element_exist?
09:28 stephan48 with Test::Mojo
09:29 stephan48 http://paste.stejau.de/?487&amp;download this is the error generated
09:29 d4rkie joined #mojo
09:30 s joined #mojo
09:31 s what's the best mojo way to fork a process and handle its output while running a webserver etc?
09:31 inokenty joined #mojo
09:34 laouji joined #mojo
09:35 s maybe an AnyEvent::Subprocess that just calls exec...
09:37 stephan48 s: maybe look at this? http://search.cpan.org/~jberger/Mojo-IOLoop-ForkCall/lib/Mojo/IOLoop/ForkCall.pm
09:44 laouji joined #mojo
09:44 ver joined #mojo
09:54 dod joined #mojo
10:07 denis_boyun joined #mojo
10:23 mire joined #mojo
10:26 alnewkirk joined #mojo
10:27 inokenty joined #mojo
10:30 sujithm_ joined #mojo
10:32 torbjorn joined #mojo
10:33 batman cfedde: why not reverse proxy?
10:34 kwa joined #mojo
10:34 batman cfedde: http://httpd.apache.org/docs/2.2/mod/mod_proxy.html
10:36 punter joined #mojo
10:37 rem_lex joined #mojo
11:04 mattastrophe joined #mojo
11:40 Eke|| joined #mojo
11:53 sujithm joined #mojo
12:10 s stephan48: thanks
12:11 stephan48 does someone have an idea to my problem?
12:11 stephan48 s: you picked the wrong moment, just as i came back ;)
12:14 batman jberger: the _ function is global. maybe that's why... like $_, @_ and %_
12:14 batman jberger: it's easier if you just ask the convos question instead of asking to ask :)
12:22 Eke- joined #mojo
12:24 neilhwatson joined #mojo
12:30 sujithm joined #mojo
12:31 sri stephan48: tags are not text
12:34 batman http://home.thorsen.pm/private/raw/notverysecret/tiger-of-wall-street.gif # vacation summarized :)
12:41 mire joined #mojo
12:41 sri http://pastie.org/8988591 # made a few tiny adjustments again
12:43 batman sri: suggestion: created/started/finished on separate lines with epoch + human readable format in two columns
12:43 sri make a paste!
12:46 batman okey
12:47 batman sri: http://pastie.org/8988610
12:48 sri hmm, that makes my eyes hurt
12:49 batman ok, epoch timestamps makes my head hurt :)
12:50 sri i wouldn't mind "Created: 2014-04-02T02:17:59  Started: 2014-04-02T02:18:24  Finished: 2014-04-02T02:18:26"
12:51 sujithm joined #mojo
12:51 sri but that doesn't fit on a line
12:52 batman what's wrong with more than one line?
12:53 stephan48 sri: aeh true.
12:53 stephan48 thanks :)
12:54 stephan48 its pretty obvious now... but i didn't think about it...
12:54 sri http://pastie.org/8988624 # the formatting is off
12:54 sri started and finished are also optional
12:55 batman can't you add a space?
12:56 sri i want something more elegant
12:56 sri http://pastie.org/8988633 # maybe like this
12:57 stephan48 the array is the job "workload" and the die is the result?
12:57 sri yes
12:57 basiliscos joined #mojo
12:57 batman i think http://pastie.org/8988624 is easier to see how long it took between the timestamps
12:58 sri not exactly a result... but if an error happened it will be shown there
12:58 batman maybe you could also have it all as a document dump?
12:58 batman as in the raw mongo document
12:59 hesco joined #mojo
12:59 sri http://pastie.org/8988641 # you mean like this
12:59 Gedge joined #mojo
12:59 stephan48 maybe something like this? http://pastie.org/8988640  http://pastie.org/8988642
12:59 sri no, you do not want the raw document dumo
12:59 sri *dump
13:00 batman ok
13:00 batman stephan48: not sure if S,W,... is very intuitive
13:00 jberger_ joined #mojo
13:01 stephan48 true
13:01 sri for completeness sake, this is the dump http://pastie.org/8988646
13:02 batman right. i agree :)
13:03 jberger_ batman: yeah, I was about to go to bed, and I didn't feel like explaining if I would have to again :-)
13:04 batman ah! right :)
13:04 batman lucky man. i haven't slept much... jet lagged :P
13:04 sri http://pastie.org/8988653 # another option, i think i like more
13:04 stephan48 jup
13:05 batman sri: http://pastie.org/8988656
13:05 arthas joined #mojo
13:05 jberger_ so even though I'm not on convos now,  is there any way to close a channel tab if you are not connected to it's server?
13:05 stephan48 uuh
13:05 batman /close #channel
13:05 batman jberger_: ^
13:06 stephan48 http://pastie.org/8988660
13:06 batman if that doesn't work, then it's a bug
13:06 jberger_ Ok I'll try again and file a bug if it's no good
13:07 stephan48 after sri pointed me onto the ovious i got my tests working now :) css selectors for attributes are pretty cool
13:07 batman jberger_: thanks :)
13:07 stephan48 obvious*
13:07 sri another complication, the error has arbitrary formatting, maybe there's a newline, maybe not, maybe it's many lines
13:08 jberger_ <3 css selectors in tests
13:09 batman sri: that's why i added "="x79 and "-"x79
13:09 stephan48 jberger_: ye
13:09 stephan48 jberger_: i am currently writing a testsuite for one of my apps, i wish i had done this ages ago... things would be so much easier
13:10 jberger_ MOAR TESTINGZ!!
13:10 stephan48 yup
13:10 stephan48 after the perl site is finished, the most fun will be unit testing JS ;)
13:11 jberger_ Admittedly I still don't test my js :-(
13:11 * sri also wonders if a command to enqueue jobs would be fun
13:11 sri ./myapp minion job -e 'test' -a '[23, "whatever"]'
13:12 jberger_ Are any of the perl JavaScript interpreters good enough to unit test non dom js functions yet?
13:12 sri arguments in JSON format :)
13:12 sri although
13:13 batman sri: i think that's a very good idea
13:13 sri i guess ./myapp eval 'app->minion->enqueue(test => [23, "whatever"])' is better
13:14 sri since there's no JSON > Perl > BSON step
13:14 batman not sure about that. i like the first, since it's more bash-friendly
13:16 jberger_ ./myapp minion job name arg arg arg ...
13:17 jberger_ Shift of the name and encode \@ARGV to BSON
13:19 sri a) bare argument is already used for job ids
13:19 jberger_ Well that doesn't work with the current command
13:20 sri b) arguments may be structures
13:20 sri i have -e and -a working, it's one line
13:20 jberger_ a I was working on fixing, b is a problem :-)
13:21 Eke|| joined #mojo
13:22 batman jberger_: have you had time to look at mandel + indexes?
13:23 jberger_ Not really :-(
13:23 batman ok. whenever you do, i would like to see when you're working on it.
13:23 jberger_ But I think I agree a new keyword is probably necessary
13:23 batman so please don't wait too long before pushing :)
13:24 batman ok. too bad index() is taken...
13:24 batman maybe we could just use ensure_index() ?
13:24 batman not sure if we can actually make the "ensure" part work without slowing down startup time though...
13:25 sri i've added it anyway https://github.com/kraih/minion/blob/master/lib/Minion/Command/minion/job.pm#L82
13:25 batman (minion job -e foo -a '[23, "bar"]')++
13:25 dotan Why does Mango (or probably Mongo) mess up my unicodes?
13:25 batman dotan: probably wrong input. are you sure the input is utf8?
13:25 stephan48 is there a way to "manipulate" a mojo::useragent? i got a controller which offloads requests to a remote api, during testing i would like to run the test against a custom server(local, maybe m::l) to test the client
13:26 jberger_ In my mind creating the index definition doesn't actually do anything, you still need to call initialize to run ensure_index
13:26 stephan48 jberger: i might be, mostly i need to test stuff like algorithms and so on, the DOM is another topic :)
13:26 sujithm joined #mojo
13:26 batman stephan48: $ua->on(start => \&do_evil_things) if $ENV{TESTING}; ? <-- that is indeed evil, and i would rather recommend changing the URL from config or something
13:27 stephan48 okey
13:27 sri http://mojolicio.us/perldoc/Mojo/UserAgent#start
13:27 dotan rss feed -> tx->dom -> text that prints widechars properly in my console. Store it in mongo db, and I get malformed chars.
13:27 stephan48 yea that was my second thought, just make a config value for it
13:27 sri no need for an env var btw.
13:27 batman jberger_: that's very good news. i hope the other users agree :)
13:27 sri http://mojolicio.us/perldoc/Test/Mojo#app
13:27 sri oops
13:27 sri http://mojolicio.us/perldoc/Test/Mojo#ua
13:28 stephan48 you mean i would just need to hook into app->ua?
13:28 dotan batman: I think the input is utf8, I suspect I'm putting perl strings into mongo?
13:28 dotan I should re-encode before calling update?
13:28 batman dotan: "i think" == "epic fail" :(
13:28 sri anyway... point is you can locally manipulate apps and the user agent in tests to do all kinds of testing stuff
13:28 batman dotan: use Devel::Peek; Dump($input); # check if utf8 flag is set
13:28 stephan48 the app in this case does the ua based request not my testsuite(which only triggers the app)
13:28 stephan48 sri: good point! thanks
13:28 dotan batman: t(han)x
13:29 sri dotan: putting perl characters into mango/mongo would be the exact right thing
13:29 jberger_ batman, I'm not sure how else it could work, there isn't necessarily a connection when defining the classes, so the only other automated way to call ensure would be to do it on every read/write :O
13:29 batman dotan: Unicode::UTF8 or Mojo::Util might help you out
13:30 sri if you have to care about encodings when dealing with mango, you're doing it wrong
13:30 batman jberger_: or on the first time you connect to a given database (which i wouldn't like)
13:30 dotan I'm going to go silent for a sec so I won't type "batman" into my debugger.
13:30 batman sri: you don't have to make sure the input has utf8 flag set for mango..?
13:31 batman dotan: good luck :)
13:31 sri batman: if you have to care about the utf-8 flag you might be doing perl wrong
13:31 jberger_ Yeah, anyway indexes were why I first added the initialize method, this just makes it easier to use
13:31 batman dotan: maybe everything is correct, while your console is iso/latin :)
13:32 batman sri: hm... i'm too jet lagged to think about encoding now.
13:32 jberger_ Always characters in perl, always bytes outside
13:32 batman jberger_: i agree
13:32 jberger_ Mango does encoding for you at that boundary
13:33 * batman and marcus had to worry about encoding before adding data to redis... browser => ws => mojo => redis
13:33 batman iirc
13:34 batman *bbl
13:36 dotan batman: what's the UTF-8 flag? I got FLAGS = (POK,pPOK)
13:37 dotan also, PV = 0x48346c0 "\342\200\234Prosumer\342\200\235"\0 - which I think is sort of unicode.
13:37 bluescreen joined #mojo
13:38 chansen A string with the UTF8 flag typically looks like "FLAGS = (POK,pPOK,UTF8)"
13:38 chansen And yes, it looks like your bytes is encoded using UTF-8
13:39 Gedge_ joined #mojo
13:39 sri http://pastie.org/8988718 # the enqueue workflow with the minion command
13:39 dotan batman: my console is fine - it shows  '“Prosumer”' (notice the smartass quotes), and  "âProsumerâ" when I pull it out of mongo.
13:40 sri dotan: odds are you've got a severe case of double encoding
13:40 sri you're not handling your input correctly
13:41 dotan sri: that's usually the case in these bugs - you need to rotate right when you rotated left or whatever...
13:42 hesco joined #mojo
13:43 chansen $ perl -MUnicode::UTF8=:all -wle 'print encode_utf8(encode_utf8("\x{201C}"))'
13:43 chansen â
13:44 dotan chansen: thanks
13:44 Dandre joined #mojo
13:48 sri http://pastie.org/8988735 # what a normal job looks like now
13:53 jrbeilke joined #mojo
13:55 btyler joined #mojo
14:05 batman sri: looks good. it's readable
14:05 batman what about the result?
14:05 sri there are no results
14:05 sri i'm back to a traditional job queue without results
14:06 sri if you want to communicate something back it's your responsibility again
14:06 sri use the app model or whatever
14:07 sri problem with results maaged by the job queue is that it encourages you to wait for them in your app... which is bad because job queues add latency most people wouldn't expect for that use case
14:07 batman ok. so the job "view" will only show timestamps, input and status?
14:08 sri there is not much more to show
14:08 batman right. makes sense
14:09 batman i guess showing input makes sense, so you can distinguish the different jobs from each other?
14:09 sri internally there's a priority and delay... maybe i'll show that as flags later, not sure yet
14:10 sri and for debugging
14:10 sri you can compare input with the error message
14:11 disputin joined #mojo
14:12 batman ok
14:22 sh4 joined #mojo
14:25 stephan48 can i have multiple Test::Mojo instances in one test file?
14:25 gryphon joined #mojo
14:25 stephan48 f.e. one providing a minimal server and one running the full app?
14:28 dotan stephan48: I bet you can. You already have multiple servers when you do $t = Test::Mojo->new(app), i.e $t->ua->server and $t->app->ua->server
14:29 stephan48 ah dammit.. thats true
14:29 dotan They will share an event loop, though
14:36 zackiv31 joined #mojo
14:38 batman stephan48: mojo allows you to. not sure if your database or other backend does though...
14:39 inokenty joined #mojo
14:39 rwstauner left #mojo
14:40 stephan48 http://paste.stejau.de/?488 i did it now like this, together with a second Test::Mojo instance for my app
15:01 hesco first-time hypnotoad user seeks advice: https://gist.github.com/hesco/8d5399fb636f24c34829
15:02 aggrolite joined #mojo
15:17 vicL joined #mojo
15:17 vicL left #mojo
15:21 vicL joined #mojo
15:27 inokenty joined #mojo
15:31 sujithm joined #mojo
15:48 zackiv31 joined #mojo
15:51 dotan so, my problem was that Mojo::Message::text doesn't decode the input if there's no charset header. So when I try to shove it into Mongo, Mango helpfully encodes it as utf-8, and I get doubly-encoded data.
15:52 dotan ... and I remember a very long blog post by Mark Pilgrim way back when saying that this is the correct behavior.
15:53 * sri has added a few more options to the job command https://github.com/kraih/minion/blob/master/lib/Minion/Command/minion/job.pm#L91
15:53 sri it is now pretty much full featured :o
15:53 dotan So, I should probably use Mojo::DOM->new(decode 'UTF-8, $tx->res->body) instead of relying on $tx->res->dom
15:53 sri from priority to delayed jobs, everything works
15:56 sri http://pastie.org/8989010 # full output now looks like this
15:56 sri delayed is in the past when it's not used ;p
15:57 sri p5 and r0 are priority and restart count
15:58 chansen heh, looks like you have a time machine ;)
15:58 sri \o/
15:59 zackiv31 joined #mojo
16:00 sri i could hide delayed if it's in the past... not sure if that would be annoying for debugging though
16:01 mire joined #mojo
16:07 beyondcreed joined #mojo
16:24 * sri uploads another minion release
16:27 sri jberger++ # great job closing issues
16:28 mire joined #mojo
16:36 hesco Could I get some help reviewing my script and advice on why this may be failing to start the hypnotoad server?  first-time hypnotoad user seeks advice: https://gist.github.com/hesco/8d5399fb636f24c34829
16:36 denisboyun joined #mojo
16:45 good_news_everyone joined #mojo
16:45 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/Hfpn-A
16:45 good_news_everyone mojo/master f67f554 Sebastian Riedel: link to Minion
16:45 good_news_everyone left #mojo
16:49 * sri loves how the full-stack solution is finally coming together... mojo, mango and minion o/
16:49 rwstauner joined #mojo
16:50 sri tightly coupled, yet interchangeable components
16:52 rwstauner so i figured out my 404s... the haml renderer doesn't work any more.  any quick tips as to what has changed recently with plugins or renderers?  or do i just need to rewrite this template and forget haml?
16:54 stephan48 which mojo version? which "haml"/haml-plugin version? code?
16:55 rwstauner haml plugin, as far as i know, hasn't changed in a long time.  I lost which version of Mojo I used to have installed, but i think it was somewhere around 4.50, and i'm trying to upgrade to latest
16:57 meshl joined #mojo
16:57 rwstauner the really confusing part was that i just started getting 404's and thought something with routing changed
16:57 rwstauner but the tests fail for the haml plugin against the latest mojo
16:57 stephan48 what does the log say?
16:57 sri 4.50 was the big renderer performance revamp, wouldn't surprise me if something a very old renderer plugin does clashes with it
16:57 rwstauner any hints for getting a backtrace?
16:57 rwstauner so far i haven't found anything useful in any logs, just the 404 template
16:59 rwstauner i'm inclined to just rewrite the templates, because thankfully i don't have many, and i've always had problems with this thing
16:59 rwstauner but since i have comaint i'd be willing to release a fix if i knew what to do about it
17:01 sri http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Adding_your_favorite_template_system
17:01 sri that's what a modern renderer should look like
17:01 rwstauner a ha, thank you
17:01 rwstauner i was looking around the repo and hadn't found that one yet
17:16 rwstauner ok, it used to look for $c->stash->{template_path} or $r->template_path($options) and if not defined, it returns early
17:17 rwstauner if i set that value to something, the tests still pass...  it seems to use path to build the cache name
17:17 rwstauner is there another way to get the "path" or does that logic just need to be rewritten?
17:18 mudler joined #mojo
17:20 rwstauner Sure enough, if i manually stash (template_path => 'path/name') it works again
17:24 rwstauner looking at the EPLRenderer it has some of its own caching stuff up top, then doesn't try to use template_path until later
17:24 rwstauner i'm guessing this should do the same
17:28 sh4 joined #mojo
17:37 marcus oslo.pm is plotting and scheming again.
17:37 marcus purl: seen crab?
17:37 purl crab was last seen on #mojo 19 days, 14 hours, 11 minutes and 20 seconds ago, saying: you dinosaur.  [Mar 14 03:26:04 2014]
17:37 marcus wat
17:38 mudler joined #mojo
17:39 tianon I love his final words :D
17:44 hesco joined #mojo
17:48 aggrolite joined #mojo
18:15 cpan_mojo Mojolicious-Plugin-LinkEmbedder 0.04 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-LinkEmbedder-0.04
18:31 Eke- joined #mojo
18:32 jim joined #mojo
18:50 zackiv31 joined #mojo
19:11 mire joined #mojo
19:17 Bender joined #mojo
19:20 mire joined #mojo
19:38 bjoernfan tempire: I looked into your MojoExample app for inspiration on database tests. It's about two years old -- is there anything you would do differently today when it comes to the tests? (I might be able to supply a few more patches in that case)
19:40 mire joined #mojo
19:56 basiliscos joined #mojo
20:02 meshl joined #mojo
20:14 denis_boyun joined #mojo
20:18 rawler joined #mojo
20:23 stephan48 bjoernfan: i had much success with using DBD::Mock with my app in the last days
20:23 stephan48 its just awesome :)
20:24 stephan48 i also looked at the MojoExample app before... but didn't see much inspiration in it for my app
20:39 bjoernfan stephan48: Thanks for the tip!
20:51 aggrolite joined #mojo
21:06 cfedde I'm having trouble with Plugin::Mount and apache mod_proxy. it seems that the mounted apps don't get the proper path prefix.
21:07 cfedde does anyone have a pointer to where to look for clues?
21:09 jim cfedde: I suggest you isolate the problem and try make it work with morbo or hypnotoad first.
21:12 cfedde It works well with morbo and hypnotoad going directly to the port.
21:14 jim cfedde, then it is likely a apache config problem, sorry not familiar with apache.
21:15 cfedde it seems that I'm screwing up the paths somewhere.
21:15 jim i am sure apache folks will jump out:)
21:17 zackiv31 joined #mojo
21:20 cfedde https://gist.github.com/cfedde/9943420 is the mount mux.
21:34 doby cfedde: be sure you have mod_proxy enabled
21:34 doby then something like
21:34 doby <VirtualHost *:80>
21:35 doby Servername blah
21:35 doby ProxyPass / http://localhost:3000/ keepalive=On
21:35 doby ProxyPassReverse / http://localhost:3000/
21:35 doby </VirtualHost>
21:41 btyler joined #mojo
21:59 sri oh wow, i didn't realize task return values had another big downside
21:59 sri the return value has to be sent to mongodb by the forked process, which requires a whole new connection
22:00 sri which is a re-connect for every single job
22:00 sri without return values i can just leave updating mongodb for successful jobs to the parent process, and reuse one connection
22:01 sri just failed jobs still require a new connection, but that's an exception, and exceptions don't have to be fast :)
22:05 mire joined #mojo
22:29 cfedde doby: ProxyPass /m/ http://localhost:3500/  timeout=300 keepalive=On
22:29 punter joined #mojo
22:30 cfedde apparently it must be / in a virutal host rather than yet another prefix.
22:32 aggrolite joined #mojo
22:40 cfedde it does "work" just the paths are missing the /m/
22:40 purl Hmm.  No matches for that, cfedde.
22:59 hesco This: $self->req->param('applicant.state'); gives me: "9='Georgia (GA)'", but I want the 'GA' instead from this:  <option value="GA">Georgia</option>
23:00 hesco how would that be accessed, please?
23:03 cfedde hesco: if that is what the client is giving you then you get to parse it out on your own.
23:09 hesco cfedde: thanks, no pre-existing method exists to extract that then, I guess.  ok, will do
23:13 dotandimet joined #mojo
23:13 mattastrophe joined #mojo
23:28 buu hesco: Uh, your html is screwed up if thats what the browser is submitting
23:31 jberger__ joined #mojo
23:35 d4rkie joined #mojo
23:42 inokenty joined #mojo
23:49 btyler joined #mojo

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