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

IRC log for #mojo, 2014-03-23

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

All times shown according to UTC.

Time Nick Message
00:02 jberger dj_goku sounds like you need to read up on jquery and ajax
00:15 dj_goku jberger: yeah, but does that sound reasonable and a good way to do it?
00:15 dj_goku I have used jquery's ajax put and post before don't remember everything though.
00:27 meshl ok jberger, got it: it seems like the WebService I am using requires the headers to be set in a specific order, and since Perl hashes do not keep ordering... well, I tried tying my %headers hash with Tie::IxHash, but unfortunately even like that the order wasn't kept...
00:28 meshl Anyone knows a way to define a specific order of the HTTP headers in Mojo::UserAgent?
00:31 meshl joined #mojo
00:33 jberger meshl you can use Mojo::Headers directly,  build the transaction first, add the headers as needed, then start the transaction
00:38 meshl ok thanks, in fact I was mistaken in my first evaluation: it wasn't a specific order that was creating the issue, but the fact that one of the headers was using encode_base64() and that function for some reason was adding an extra carriage return at the end of the string, which wasn't stripped by UserAgent
00:39 meshl a simple chomp() resolved my issue, I am all happy :D
00:40 meshl but yeah, now I know: see http://perldoc.perl.org/MIME/Base64.html :
00:40 meshl "The returned encoded string is broken into lines of no more than 76 characters each and it will end with $eol unless it is empty."
00:53 jberger huh, well you learn something new every day
01:05 meshl today was new, yeah: new-line ;)
01:23 disputin joined #mojo
01:40 mattastrophe joined #mojo
01:41 meshl Has anyone tried to increase the daemon's performance using MCE? (http://perltricks.com/article/61/2014/1/21/Make-your-code-run-faster-with-Perl-s-secret-turbo-module)
01:52 jberger mce is probably more useful for processing lots of data.
01:56 jack joined #mojo
02:05 Tiger|2 guys, i want create contoller http://pastebin.com/dpphq7UX, but i got error  Can't call method "" on unblessed reference at line 12
02:07 Tiger|2 in my situation i cant use this in new? $self->$connector = DBIx::Connector->new  . I have very small expirience with perl  OOP
02:09 jberger Tiger I recommend you learn a little more about Perl first. I like Modern Perl by chromatic
02:10 jberger and you are right to suspect that line
02:14 Tiger|2 jberger: i right understand what a can't use methods on self while hash is unblessed?
02:25 Kundun joined #mojo
02:25 rem_lex| joined #mojo
02:30 jberger there is that, but also you can't assign to a method (usually, this case included)
02:31 jberger also, you rarely use a variable as a method name
02:38 Tiger|2 joined #mojo
02:45 klapperl joined #mojo
03:11 Tiger|2 i try to write simple model http://pastebin.com/n139BDTS and get warning in log when i use screen_delete method: DBI::db=HASH(0x2314c70)->disconnect invalidates 1 active statement handle (either destroy statement handles or call finish on them before disconnecting)
03:12 Tiger|2 before i use only DBIx::Connector without my class ant i didn't get this error
03:14 Tiger|2 in main app i use db helper http://pastebin.com/vraEFkJ7
03:29 jberger sorry, that looks to be beyond the scope of this channel
03:30 jberger it's certainly out of my realm of knowledge
04:13 dj_goku Tiger|2: the few times I get that error is when I re-use a database handle that is being used some where else before it is finished.
04:14 damaya Does morbo cache pages in full apps or something? When working with lite apps I never have to restart morbo. However, when working with full apps I find myself having to restart morbo every time I make a change to anything (HTML, CSS, code).
04:33 jberger you have to make sure that morbo is watching all of your files
04:33 jberger it's easy when there is only one :-)
04:41 hesperaux_ joined #mojo
04:48 damaya :)
04:48 damaya Hm... my structure is lib/, public/, script/, t/, templates/...
04:48 damaya I did a mojo generate app MyApp
04:49 damaya not sure why it's not watching them
05:38 Vandal joined #mojo
06:53 dod joined #mojo
07:01 hesperaux__ joined #mojo
07:08 dod joined #mojo
08:06 jack joined #mojo
08:43 sh4 joined #mojo
09:19 basiliscos joined #mojo
09:40 denisboyun joined #mojo
10:29 punter joined #mojo
10:41 batman dj_goku: thanks for the feedback :)
10:42 batman the good thing about installing sass is that now you can customize your own public/sass/bootstrap.scss to make it smaller
10:43 batman but it should work out of the box without sass as well after the fix in assetpack
10:46 laouji joined #mojo
10:47 cpan_mojo Mojolicious-Plugin-AssetPack 0.09 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-AssetPack-0.09
11:23 malikai joined #mojo
11:30 edestler joined #mojo
11:32 malikai heh.. i just wrote a feed server in 95 lines of code in about 3 hours.. :)
11:37 dotan joined #mojo
11:45 d4rkie joined #mojo
11:47 mire_ joined #mojo
11:55 malikai make that 86.. :)
12:10 dvinciguerra joined #mojo
12:19 meshl joined #mojo
12:22 bjoernfan Do we have a perltidy thing for ep templates?
12:28 mattastrophe joined #mojo
13:56 mudler i jusy use htmltidy for ep, works quite well
13:56 mudler on sublime there is htmlbeautify that with few adjustments plays well
14:03 basiliscos joined #mojo
14:06 disputin joined #mojo
14:33 denisboyun joined #mojo
14:44 gryphon joined #mojo
14:55 dj_goku batman: no problem glad I could help!
14:56 batman :)
15:07 jack joined #mojo
15:21 ua_ joined #mojo
15:22 bjoernfan mudler: Thanks, I'll look into that!
16:42 punter joined #mojo
17:26 edestler joined #mojo
17:34 punter We know that morbo outputs all requests/responses to STDERR... and I have a question: Does hypnotoad do the same (and this output just gets lost because noone's capturing each worker's STDERR)?
17:34 punter or is hypnotoad not outputing anything to STDERR?
17:35 punter because if it does output, I can try capturing it with a trick.
17:35 webart left #mojo
17:35 dotan Did you know your app and Mojo::Test see different URLs, even when fetching the same routes?
17:36 moritz punter: hypnotoad logs to a log file by default if log/ exists
17:36 moritz or logs/? dunno
17:36 punter o
17:37 punter you might be right, I'll check.
17:37 punter even though i doubt it logs every single request's entire input & output
17:41 dotan punter: what gets printed to the log is controlled by the log level set on you app's Mojo::Log object.
17:41 dotan The log level is set at startup based on the current mode (MOJO_MODE, I think) - "development" or "production" (or maybe "development" and "anything else".
17:42 punter dotan + moritz, It doesn't log the entire requests' input + output, even if I set all the environment variables right
17:42 punter hypnotoad doesn't, I mean. Morbo does.
17:42 dotan hypnotoad has a different default mode than morbo, which assumes "development".
17:43 punter dotan, I know, I set it it to development
17:43 punter and I set log level to debug
17:43 stephan48 remember please that for hypnotoad to pick a mode change it needs a full restart
17:43 punter I did a full restart
17:45 punter It's only Daemon that does full-output logging: https://metacpan.org/pod/Mojo::Server::Daemon#DEBUGGING
17:47 punter Which is a pitty, because I have three environments: local PC, testing and production. I want testing to be with Hypnotoad, but also have full-logging like Morbo
17:51 dotan punter: Mojo::Server::Prefork inherits from Mojo::Server::Daemon and it doesn't look like it overrides the methods with the debugging output - or am I missing something?
17:52 punter I only checked the logfile and saw the output wasn't there... haven't checked STDERR yet (which is where the docs say the full-output is written). So you might be right.
17:53 punter There's still hope
17:53 moritz <Aragorn>There is *always* hope</Aragorn>
17:53 dotan :)
18:28 punter dotan + moritz: indeed hypnotoad has inherited from Daemon, and when I captured STDERR, I got the full-request log I wanted
18:28 punter thanks
18:29 punter It's just that responses don't appear always immediately after their requests (due to parallelism)
18:30 punter but doesn't matter because each response states which request it came from
18:30 punter *STDERR = $fh was the magic line
18:43 mudler bjoernfan: you are welcome :)
18:44 mudler but if someone knows a perl and html formatter would be awesome :P
18:56 sujithm joined #mojo
19:46 dvinciguerra joined #mojo
20:04 toebu joined #mojo
20:05 toebu hi
20:06 toebu mojo inherits sockets to forked kids ... perl -Mojo -E 'a(q{/} => sub { system q{ls -l /proc/self/fd/*};shift->render(text=>q{}); })->start' get /
20:06 edestler joined #mojo
20:07 tempire poll:
20:07 tempire what are the most common ::DOM and ::Collection methods you use
20:07 toebu setting FD_CLOEXEC on the socket handle would help
20:07 tempire jberger, marcus ^
20:08 tempire and anyone else who has an opinion
20:10 denis_boyun joined #mojo
20:28 zivester joined #mojo
20:36 sri joined #mojo
20:37 sri tempire: fuck off!
20:37 purl the fuck is now OFF
20:37 gryphon joined #mojo
20:39 Adurah siri sure has changed.
20:41 sri joined #mojo
20:42 sri eat a bowl of dicks!
20:42 diazepan joined #mojo
20:42 Adurah Mojo has finally made him crack.
20:45 ravenger joined #mojo
20:48 tempire this is the trouble with irc.perl
20:48 go|dfish fake sri :/ how sad
20:48 tempire no nick reserving
20:49 tempire Let's fix that.
20:49 sri joined #mojo
20:50 sri op me
20:50 Adurah Op yourself.
20:51 sri i suck cock for op
20:52 tempire ok.
20:52 tempire that's taken care of.
20:52 sri joined #mojo
20:53 sri \o/
20:53 Adurah About time sri became American.
21:13 sri left #mojo
21:17 malikai lol wtf
21:24 espent joined #mojo
21:26 meshl joined #mojo
21:41 rem_lex joined #mojo
21:42 zM joined #mojo
21:54 mudler joined #mojo
22:28 tempire dernit
22:28 tempire lost the handle
22:28 tempire hope it's in good hands
22:37 mire_ joined #mojo
22:37 marcus hmm
22:37 marcus tempire: find and each? :)
23:06 marty joined #mojo
23:11 D4RK-PH0ENiX joined #mojo
23:37 mire_ joined #mojo
23:39 * tempire considers going to cocoaconf#sanjose

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