Camelia, the Perl 6 bug

IRC log for #mojo, 2011-05-30

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

All times shown according to UTC.

Time Nick Message
00:42 GitHub168 joined #mojo
00:42 GitHub168 mojo: master Sebastian Riedel * 11feaba (2 files in 2 dirs): improved Mojo::DOM collection rendering slightly - http://bit.ly/kz9Ijn
00:42 GitHub168 left #mojo
00:43 d4rkie joined #mojo
00:47 D4RK-PH0ENiX left #mojo
00:50 preflex left #mojo
00:53 preflex joined #mojo
00:54 D4RK-PH0ENiX joined #mojo
00:56 fhelmber_ joined #mojo
00:57 fhelmber_ left #mojo
00:57 fhelmber_ joined #mojo
00:57 mmcleric joined #mojo
00:57 d4rkie left #mojo
02:00 GitHub23 joined #mojo
02:00 GitHub23 mojo: master Sebastian Riedel * eb3fb85 (1 files in 1 dirs): improved Mojo::DOM synopsis examples - http://bit.ly/j5y8gl
02:00 GitHub23 left #mojo
02:04 hidek left #mojo
02:06 hidek joined #mojo
02:13 GitHub197 joined #mojo
02:13 GitHub197 mojo: master Sebastian Riedel * 0adde13 (1 files in 1 dirs): removed a few confusing examples - http://bit.ly/myvZqr
02:13 GitHub197 left #mojo
02:16 Alias joined #mojo
02:31 sri hmm, might as well make those Mojo::DOM features non experimental, don't think people would let me remove them again :D
02:32 d4rkie joined #mojo
02:36 D4RK-PH0ENiX left #mojo
02:55 crab :-)
03:18 preflex left #mojo
03:20 preflex joined #mojo
03:21 D4RK-PH0ENiX joined #mojo
03:25 d4rkie left #mojo
04:00 GitHub62 joined #mojo
04:00 GitHub62 mojo: master Sebastian Riedel * a6fe287 (1 files in 1 dirs): improved Mojo::DOM documentation further - http://bit.ly/kKVszT
04:00 GitHub62 left #mojo
04:00 sri i still don't like add_before and add_after though
04:01 sri prepend/append would be nice, but they do something entirely different in jquery :/
04:03 crab you don't like the names?
04:03 sri ye
04:04 sri they are originally called before/after
04:04 sri but that's not really an option
04:04 crab to be honest, i've often found the jquery nomenclature for those functions to be a bit confusing.
04:05 sri well, i wanted to add prepend/append too, but really hate the inconsistency :S
04:05 d4rkie joined #mojo
04:06 sri maybe there are alternatives
04:06 sri i just want consistent naming
04:07 sri add_before and add_before_content maybe
04:07 crab somelement->prepend(thiselement) makes good sense when reading (but, as you say, conflicts qith jquery)
04:07 crab add_before_content being jquery's prepend()-alike?
04:07 sri ye
04:08 sri then again, we have replace and replace_inner
04:08 sri add_before_inner ;p
04:08 sri add_after_inner
04:09 sri or rename replace_inner to replace_content
04:09 D4RK-PH0ENiX left #mojo
04:12 crab prepend_to_content() and append_to_content(), plus replace_content()
04:15 sri oh, inner_xml would also need a new name i guess
04:16 sri we kinda use inner consistently for this case atm
04:26 crab are all the tag helpers non-experimental now?
04:26 sri ye
04:27 sri they've been used so much in the documentation there was no point keeping them experimental
04:28 crab nice. so, what would be the recommended way to modify the form helper so as to prepend a single field to every form?
04:29 sri make a new form helper?
04:29 sri my_form_for
04:29 Foxcool joined #mojo
04:29 sri form_for_with_something_cool
04:29 sri form_with_something_cool_for
04:29 crab sri: that's what i've done for myself already, but i'm asking now for a plugin which transparently adds csrf protection to all post forms
04:30 sri replace form_for then
04:30 crab replace it altogether, not trying to reuse the existing one? ok, fine.
04:30 sri there will even be a debug warning telling your users it has been replaced
04:30 sri reuse the existing one if you like
04:31 crab ideally, i would like this plugin to be in core
04:31 crab but it adds dependencies, so it's not such a great idea
04:31 sri not much of a chance then
04:32 crab if only there were a portable, compact way to get secure randomness... but there isn't, so no point wishing.
05:22 MisterHatt left #mojo
05:27 j3nnn1 left #mojo
05:27 D4RK-PH0ENiX joined #mojo
05:30 MisterHatt joined #mojo
05:31 d4rkie left #mojo
05:45 koban` joined #mojo
05:59 D4RK-PH0ENiX left #mojo
06:17 perlrocks Twitter: "Let's see how the article will, I think a little cookbook for Mojo:: DOM would not be bad. # Mojolicious" (de) --rabenfeder http://twitter.com/rabenfed​er/status/75083338225942529
06:17 Kulag left #mojo
06:17 Kulag joined #mojo
06:18 perlrocks Twitter: "Until now viewed not as intense, but is really good: Mojo:: Asset I / O complete peace of mind # mojolicious" (de) --rabenfeder http://twitter.com/rabenfed​er/status/75083733534912512
06:22 perlrocks Twitter: "Question on an article for the next freeX answered positively. CSS Selectors with Mojo:: DOM perl # # # mojo mojolicious" (de) --rabenfeder http://twitter.com/rabenfed​er/status/75084628351918080
06:22 miyagawa left #mojo
06:24 AmeliePoulain joined #mojo
06:29 perlrocks Twitter: "#mojolicious hack of the day: "perl -MMojo::DOM -E'say Mojo::DOM->new(qq{<div><p id="test">Test</p></div>})->div->p->{id}'" #perl" --kraih http://twitter.com/kraih/status/75086333009330176
06:35 abqar joined #mojo
06:46 miyagawa joined #mojo
07:01 d4rkie joined #mojo
07:17 arovij joined #mojo
07:21 koban` hi ppl
07:21 arovij I want to extract XXXX from following string. XXXX contains multiple \r\ns . <input type="hidden" name="alpha" value="XXXXX" />
07:21 Alias left #mojo
07:22 arovij left #mojo
07:22 koban` sri: tests for Mojo::Dom on github broken?
07:23 sri you're the second to ask that
07:23 sri nope they are not
07:23 perlrocks Twitter: "1.34 Mojolicious http://ow.ly/1cWCnb" (sw) --campuscodi http://twitter.com/campusco​di/status/75099962752503808
07:23 zakame joined #mojo
07:25 koban` hmm
07:28 mattastrophe left #mojo
07:31 mattastrophe joined #mojo
07:36 sri using activeperl by any chance?
07:37 sri https://github.com/kraih/mojo/issues/153 # the other one
07:38 koban` no, i'm under freebsd
07:38 sri weird
07:38 koban` bug report looks the same
07:39 sri could be an old perl bug
07:41 koban` http://pastebin.com/W2Rk1ZWi
07:42 sri there is pretty much no chance i could do anything for you
07:43 sri there are only two options... a) you debug it, b) we call it a perl bug ;)
07:43 koban` :)
07:43 koban` i'll try to debug it
07:46 ysyrota joined #mojo
07:50 cosmincx joined #mojo
07:53 GitHub17 joined #mojo
07:53 GitHub17 mojo: master Sebastian Riedel * c9a7c7f (2 files in 2 dirs): added a few more Mojo::DOM tests - http://bit.ly/iICcqV
07:53 GitHub17 left #mojo
08:30 spleenjack joined #mojo
08:45 perlrocks Twitter: "Gotta love how they drag #mojolicious into this, our announcement was out after only 2 hours, theirs took 3 days. http://t.co/eMfgLBL #perl" --kraih http://twitter.com/kraih/status/75120643179417600
08:45 sri :)
08:58 sri damn, nobody cares... one has to wonder if they have actual users
09:20 perlrocks Twitter: "Organizing the Copenhagen #Perl Mongers meeting tomorrow night, a presentation on #mojolicious  is scheduled" --jonasbn http://twitter.com/jonasbn​/status/75129491663495168
09:36 marcus sri:  building good will again ? ;)
09:37 sri ;p
09:37 sri trolling them is kinda fun, but not much to gain
09:38 sri what annoys me a bit is that sukria acts like he has no idea what i'm talking about
09:39 stephan48 sri: the page is down?
09:39 sri page?
09:39 purl page is white, together we learn to read and write or meow
09:39 stephan48 the one http://t.co/eMfgLBL refers to
09:39 sri nope
09:40 stephan48 can you give me the long uri?
09:40 stephan48 the short uri doesnt seem to work then
09:40 sri http://www.backup-manager.org/piperma​il/dancer-users/2011-May/001484.html
09:41 sri if that isn't deflection i don't know what is
09:42 stephan48 mh...
09:42 stephan48 that page doesnt want to load here...
09:43 stephan48 ah my proxy had issues with it
09:43 moritz https://github.com/sukria/Dancer/commit/​a4b5d16cc8612e71ace4d2d140bbda5812d71fd3
09:43 moritz that seems to be the actual bug
09:43 moritz ... fix
09:43 sri Oo
09:44 moritz wait, that's only a test file
09:44 miyagawa Nope.
09:44 moritz or was it https://github.com/sukria/Dancer/commit/​573b3d7a6b21b0a06101a9c2f77d80763413697c ?
09:44 moritz the commit message isn't very good
09:45 stephan48 so someone there stumpled upon the fact that they have a problem and then opened a CVE on mojo to later tell we fixed it also?
09:45 sri nope, we fixed it over a month ago
09:45 sri the cve is old
09:46 sri someone just recently stunbled over the fact that the exploit also works with dancer
09:46 stephan48 k
09:46 sri i asked earlier if they really didn't announce the issue, few minutes later thet did ;p
09:47 sri s/t/y/
09:49 sri amateur hour
09:49 Akron joined #mojo
09:50 sri it's like kicking puppies... kinda feel bad now
09:51 tabbi joined #mojo
09:51 tabbi left #mojo
09:52 sri koban`: any luck debugging?
10:04 crab i cannot access that www.backup-manager.org url either.
10:05 marcus are you human, or are you dancer? / we are the robots
10:05 sri can we get back to the real issue now?
10:05 marcus http://www.youtube.com/watch?v=VXa9tXcMhXQ
10:05 sri what should i name prepend and append in Mojo::DOM?
10:06 marcus sri: stuffinfront and stuffatheend
10:06 crab marcus: that again leaves it ambiguous whether it's outer-prepend or inner-prepend
10:06 sri yea
10:08 sri that song is awesome though
10:10 plu left #mojo
10:11 sri i still tend towards add_before_inner and add_after_inner
10:11 sri *OR*
10:11 sri we rename all
10:11 crab prepend_to_inner?
10:12 crab and prepend_to (for outer)?
10:12 sri prepend/append and prepend_inner/append_inner
10:12 sri kinda like those
10:15 sri nobody?
10:15 purl sri, do you have a body, or you just happen to have no body like me...
10:18 koban` sri: it seems that overloaded "''" in M::DOM::_Collection work strange :(
10:19 crab sri: yes, prepend/append and prepend_inner/append_inner seem logical
10:25 sh4 joined #mojo
10:42 perlrocks Twitter: "Mojolicious in the cloud: Hello DotCloud! - Sebastian Riedel about Perl and the Web http://htn.to/ScCm4t" (ja) --yusukebe http://twitter.com/yusukeb​e/status/75149961024643072
10:42 perlrocks Twitter: "Discard the current session / Mojolicious Reference - Introduction to Perl code from the sample http://bit.ly/kIAlXD" (ja) --wPerlnews http://twitter.com/wPerlnew​s/status/75149970470207488
10:42 perlrocks Twitter: "Storing data in the session / Mojolicious Reference - Introduction to Perl code from the sample http://bit.ly/mjiz9J" (ja) --wPerlnews http://twitter.com/wPerlnew​s/status/75149972814835712
10:55 robinsmidsrod does anyone have a template/tutorial on how to make a mojolicious-based webapp that uses twitter OAuth for authorization?
10:56 perlrocks Twitter: "Storing data in flash / Mojolicious Reference - Getting Started with Perl code samples http://bit.ly/iuYifv" (ja) --wPerlnews http://twitter.com/wPerlnew​s/status/75153492867682304
10:56 perlrocks Twitter: "To convert a hash reference parameter / Mojolicious Reference - Getting Started with Perl code samples http://bit.ly/iV06vj" (ja) --wPerlnews http://twitter.com/wPerlnew​s/status/75153495073882112
10:58 sh4 left #mojo
10:58 robinsmidsrod sri: about the naming of append/prepend methods, I would suggest that you use the same as jquery does, as at least the names have been entrenched there
10:58 robinsmidsrod easier for people that use both to remember too
11:00 perlrocks Twitter: "briefly describe the select tag / Mojolicious Reference - Getting Started with Perl code samples http://bit.ly/lU4N4y" (ja) --wPerlnews http://twitter.com/wPerlnew​s/status/75154543297560576
11:00 robinsmidsrod http://api.jquery.com/category/ma​nipulation/dom-insertion-inside/ http://api.jquery.com/category/ma​nipulation/dom-insertion-outside/ http://api.jquery.com/category/ma​nipulation/dom-insertion-around/
11:05 sri robinsmidsrod: not an option
11:06 robinsmidsrod sri: okay, just thought I'd chime in :)
11:06 robinsmidsrod you shouldn't by any chance know about anything for my other question, do you?
11:07 sri afraid not
11:07 sri only know marcus had a facebook plugin
11:07 robinsmidsrod crap - was hoping that I could find some prior art
11:07 marcus actually just an oauth2 plugin
11:07 robinsmidsrod not exactly sure what is the best way to approach it
11:08 marcus facebook graph api is just http and json
11:08 marcus don't need a plugin
11:08 GitHub163 joined #mojo
11:08 GitHub163 mojo: master Sebastian Riedel * ad5677d (4 files in 4 dirs): added append_inner/prepend_inner methods to Mojo::DOM and deprecated add_after/add_before in favor of append/prepend - http://bit.ly/jYdnjd
11:08 GitHub163 left #mojo
11:08 sri was way easier than expected :)
11:11 robinsmidsrod marcus: have you tried integrating twitter oauth in any of your webapps?
11:12 marcus robinsmidsrod: still waiting for them to adopt oauth2
11:13 * robinsmidsrod hasn't read up on oauth2
11:13 marcus it's way simpler
11:13 robinsmidsrod what is the core difference?
11:13 perlrocks Twitter: "Modifying html with Mojo::DOM should be just as much fun as extracting data now. :) http://t.co/GU375Oc #perl #mojolicious" --kraih http://twitter.com/kraih/status/75157899780964353
11:15 sri oauth1 pretty much sucks
11:16 sri oauth2 just a little
11:19 sri and when i say pretty much sucks i mean it's a total mess
11:19 robinsmidsrod reading this now: http://stackoverflow.com/questions/41139​34/how-is-oauth-2-different-from-oauth-1
11:20 sri that makes it look so easy
11:20 marcus oauth2 is very easy
11:20 marcus the hardest part is having https :)
11:20 sri when they say oauth1 needs cryptography they mean you have to calculate shitloads of checksums for different parts of the http message...and and and
11:21 sri it was about 300 lines of dense code i think
11:22 marcus yeah
11:22 sri compared to like 5 lines for oauth2
11:23 robinsmidsrod ooh, that IS impressive
11:24 sri can't you just use that xauth thingy for twitter?
11:24 sri i think it was easier
11:25 sri oh, seems those also need to be signed
11:25 marcus also, you need to apply to use xauth
11:25 robinsmidsrod xauth needs manual approval, doesn't it?
11:25 marcus and I bet they stop allowing it now
11:25 sri http://dev.twitter.com/pages/auth#signing-requests # TEH FUN!
11:26 marcus I seem to remember twitter saying everyone needs to get over on ouath recently
11:26 sri yea
11:27 sri they are disabling private messages with xauth or so
11:27 sri it's so stupid
11:28 marcus except twitter's own clients ofcourse
11:31 sri http://mojolicio.us/perldoc?Mojo/DOM # really has grown up :)
11:32 robinsmidsrod how fast is Mojo::DOM compared to other dom-traversal implementations? have you benchmarked it?
11:33 sri twice as fast as HTML::Parser/TreeBuilder
11:33 robinsmidsrod wow - impressive!
11:34 robinsmidsrod and how does it deal with really bad tag soup?
11:34 sri my primary focus is usability though
11:34 sri it is rather good at html healing now
11:34 sri enough to handle boingboing :D
11:35 robinsmidsrod the HTML5 spec says something about how UAs should parse tag soup, doesn't it? do you follow that spec, or some other?
11:35 sri parts of it
11:35 purl parts of it are in English
11:36 robinsmidsrod I seem to recall this was one of the major changes in firefox4 - using the HTML5 parser spec
11:36 sri yea, i've been thinking about doing a full implementation, but never had the time to go through the whole spec
11:36 sri it's really huge
11:37 robinsmidsrod I can imagine
11:37 sri i've mostly concentrated on the hard exceptions
11:37 sri like script/style tags, optional tags
11:37 sri html4 leftovers
11:38 robinsmidsrod are there any other cpan modules that support DOM traversal using CSS selectors?
11:38 sri quite sure a full html5 spec parser would also be a lot slower
11:38 * robinsmidsrod haven't noticed any
11:39 robinsmidsrod yeah, I guess you'd have to dive into C-space to make it speedy enough
11:39 sri https://github.com/kraih/mojo/​blob/master/t/mojo/dom.t#L1559
11:39 sri just look thought the tests to see what we can handle :)
11:39 sri i test *a lot*
11:40 robinsmidsrod that is a good habit
11:41 robinsmidsrod just thinking about how to make a webapp of list.pl from https://github.com/robinsmi​dsrod/twitter_daily_archive
11:42 robinsmidsrod as you can see, it is fairly basic stuff, just thinking about how I can improve it to make it a webapp that authenticates twitter users and can be multi-user
11:42 robinsmidsrod right now it is a single-user app
11:43 sri well, if you don't have performance requirements you could just use Net::Twitter or so
11:43 robinsmidsrod I'm using net::twitter
11:43 sri it installs half of cpan, but should work
11:44 robinsmidsrod it does, actually, archive.pl fetches stuff and showes it into a database
11:44 robinsmidsrod I run it from crontab every hour
11:45 robinsmidsrod and then I can do ./list.pl to see a list of today's tweets, or ./list.pl yesterday to see yesterday's tweets
11:45 * robinsmidsrod is trying to fix his information overload
11:45 Kallisti is now known as blablup
11:46 Kallisti joined #mojo
11:49 blablup left #mojo
11:57 sri btw. you can test the Mojo::DOM parser right from the command line
11:57 sri mojo get mojolicio.us '[id]' attr id
11:58 sri mojo get mojolicio.us 'head > title'
11:58 robinsmidsrod fancy!
11:59 sri it's a primary testing tool in mojolicious ;)
11:59 sri ./myapp.pl get / 'head > title'
12:00 sri because looking at whole html pages sucks ;)
12:02 robinsmidsrod cool! just tried it against a mojo webapp I have written
12:03 robinsmidsrod didn't know I could do that - I learn something every day!
12:03 sri mojo get digg.com 'h3.story-item-title > a[href]' text
12:03 sri the latest digg headlines :D
12:03 sri http://mojolicio.us/perldoc?Mojoli​cious/Guides/Cookbook#Command_Line # the documentation
12:05 robinsmidsrod I can see you're a fan of Futurama :)
12:05 sri not really... i *am* bender!
12:06 robinsmidsrod question, why do you use text-shadow: 0 1px 0 #DDDDDD on the body text? sure, it looks nice on headers and such, but I find that it slightly decreases readability compared to the subpixel-hinting that is default
12:07 sri i actually like it
12:08 robinsmidsrod sure, I understand that - it is just that when I read large amounts of text I find that it slightly lowers my reading speed
12:10 perlrocks Twitter: "#mojolicious bonus hack of the day: "mojo get digg.com 'h3.story-item-title > a[href]' text" #perl" --kraih http://twitter.com/kraih/status/75172173345591296
12:10 sh4 joined #mojo
12:10 sri you can also read it with perldoc or on search.cpan.org
12:11 * robinsmidsrod knows
12:11 robinsmidsrod I guess that is why typography is somewhat of an art form
12:15 sri mojo get www.reddit.com/r/perl/ 'p.title > a.title' text
12:15 sri the latest perl news :)
12:22 robinsmidsrod head exploding with circularity http://www.reddit.com/r/perl/comments/he​g6m/can_a_blessed_coderef_return_itself/
12:28 sugar joined #mojo
12:33 sri koban`: you mean overload '""'?
12:33 koban` yep
12:34 koban` seems it happens due to compile options for perl
12:34 sri weird
12:36 koban` when use this '-Dusemultiplicity=yes -Dusethreads=yes -Dusemymalloc=no' tests for Mojo::DOM failed
12:36 koban` our admin investigate this
12:47 Foxcool left #mojo
13:02 AmeliePoulain I've got strange behavior. For example, I have this routing code: $r->render('test')->to(cb => { my $self = shift; my $data = $self->req->params->to_hash; $self->render(json => $data); }); When I open it in browser with a some parameters in unicode divided by comma and space, I'we got incorrect text.
13:03 AmeliePoulain ex: /test?text=привет, вася    goes to "text": "привет, ��������"
13:03 Foxcool joined #mojo
13:05 mattastrophe left #mojo
13:05 AmeliePoulain And sometimes it works correct
13:15 AmeliePoulain Any ideas?
13:24 Akron What's the charset declared in the header?
13:27 AmeliePoulain utf-8
13:28 Akron And it's not conflicting with the html charset? What's the charset your browser has chosen?
13:28 AmeliePoulain utf-8 too
13:29 Akron Is the example online?
13:29 Akron Or do you have an example sript in a pastebin?
13:30 Akron script
13:31 Akron Is the behaviour the same on the commandline using Mojolicious "get" directive?
13:32 AmeliePoulain I have \x{fffd} after ", " when dumping where cyrillic characters should be
13:32 AmeliePoulain Akron, I'ts too big code. You can see it at github.com/VeroLom/FW
13:36 AmeliePoulain Now I try to see result of "get"
13:39 AmeliePoulain "get" directive returns same broken characters like in hypnotoad
13:40 moritz can you boil it down to a 10-line ::Lite script?
13:41 Akron AmeliePoulain: Sorry, no idea where to look at.
13:42 AmeliePoulain moritz, no, it's difficult
13:43 AmeliePoulain How I can catch query string in start of dispatching (?)? Like before routing.
13:52 zakame left #mojo
14:01 sri if you can't boil a problem down to a 10 line lite app it's most likely not a mojolicious problem ;)
14:02 sri in which case you would have a general encoding problem
14:03 sri and in which case you should just follow the data until it gets turned into garbage
14:04 moritz agreed
14:04 moritz debugging charset problems is just like debugging any problem where wrong data comes out
14:07 AmeliePoulain left #mojo
14:22 kmx left #mojo
14:23 kmx joined #mojo
14:50 Foxcool left #mojo
14:50 Foxcool joined #mojo
14:56 gbacon joined #mojo
14:58 gbacon how should I test my login workflow? I'm planning to add OpenID and reCAPTCHA. Does Mojo do IoC?
14:58 arpadszasz joined #mojo
14:59 koban` left #mojo
15:00 abqar left #mojo
15:01 crab what is IoC?
15:01 purl IoC is probably International Olympics Committee or Inversion Of Control, e.g. IOC.pm or the newer Moose-a-licious Bread::Board or about constructor parameters
15:01 crab yes, mojo is on good terms with the international olympics committee.
15:05 moritz Mojolicious does inversion of control, yes
15:05 moritz that's the "framework" part :-)
15:05 crab but... what does inversion of control have to do with testing login?
15:06 crab i just use Test::Mojo.
15:07 * moritz doesn't understand the connection either
15:18 mattastrophe joined #mojo
15:19 gbacon good, then maybe I'm missing something; how else would I test login with OpenID or creating new accounts with reCAPTCHA with challenges to which I can't correctly respond with the real systems?
15:20 gbacon E2MANYWITHS
15:23 d4rkie left #mojo
15:23 cosmincx left #mojo
15:24 moritz gbacon: there are several options
15:24 moritz gbacon: 1) use the real systems
15:24 moritz gbacon: 2) set up a fake system
15:25 moritz gbacon: 3) store responses from the real systems and use them to test your system
15:25 moritz of course 1) is a bit hard to automate with recaptcha :-)
15:25 gbacon :-)
15:27 gbacon so rather than dependency injection for 2, are you suggesting that I toss up quick stubs with, say, perl -Mojo?
15:28 gbacon i.e., integration tests rather than unit tests?
15:30 moritz well, for unit tests you don't need the real system anyway
15:30 moritz for unit tests you just feed something into your program, and watch its response
15:31 * moritz thinks there's some mismatch between his and gbacon ideas of testing
15:33 al does mojo support array form inputs?
15:33 al i.e. <input name="arr[]">
15:34 moritz what kind of request does that produce?
15:34 al the browser does nothing special with
15:35 moritz then mojo doesn't need to support it
15:35 al but i've seen support for having data in an array structure in other frameworks using that syntax
15:35 gbacon moritz: let's get concrete then. how would you test an OpenID login? fire a fake response at http://myapp/openid_return and look for ->text_is("html body header p", "Welcome, OpenIdUser")?
15:35 stephan48 gbacon: i would do a captcha provider thingy, and then just inject a fake provider when you test which generates for you testable results...
15:35 al moritz, of course it doesn't have to. it's sugar
15:35 moritz gbacon: exactly
15:36 stephan48 gbacon: use a openid client which actually logs in?
15:36 moritz al: I still don't get it... if the browser does "nothing special" with it, how could mojo have support for it?
15:36 moritz does it produce arr[]=1,2,3 as param?
15:36 stephan48 gbacon: f.e. fire a openid client test app and make it login against the server test or such stuff
15:37 al i have multiple inputs with name="something[]" and $self->param('something') gets me an array ref
15:38 moritz ah, now I understand
15:41 al sorry for being cryptic, i thought it was an established concept
15:43 moritz fwiw mojo already turns multiple params of the same name into a list
15:43 moritz no need for []
15:43 stephan48 is something[] specced now or is it still some php shit?
15:43 stephan48 which accidentially worked in php and got then ported?
15:45 al moritz, it does?
15:45 moritz al: I just tested it
15:45 al i think i got "undef" when i gave it a quick try
15:45 moritz (I called it in list context, if that matters)
15:48 moritz $ perl -MMojolicious::Lite -MData::Dumper -e 'get "/" => sub { print Dumper [shift->param("a")] }; app->start' get '/?a=1&a=2'
15:48 moritz has   $VAR1 = [ '1', '2' ];  in the debug output
15:55 al mh, seems to work with GET only
15:55 moritz and with 'scalar' instead of '[...]' I get 1
16:01 kaare joined #mojo
16:01 al hmkay
16:02 al doesn't work with multipart/form-data forms
16:02 al but that i can probably work around
16:02 al thanks moritz
16:05 arthas joined #mojo
16:24 spleenjack1 joined #mojo
16:24 spleenjack left #mojo
16:37 d4rkie joined #mojo
16:45 crab al: i use it all the time with get and post forms, including multipart/form-data
16:46 crab in fact, it's more or less critical to a lot of my code that ->param('x') return all the values submitted for x
16:49 crab at first, i was worried about the order in which browsers would submit the values, especially when multiple multiple-valued inputs were used, and some could be empty etc. but then i'm using jquery.form.js, which serialises predictably, so i don't have to worry any more.
16:49 al mhmh, i removed the multipart/form-data and it worked
16:50 crab you're doing something wrong.
16:50 al yea, probably
16:50 al i'll look into it tomorrow again
16:50 al thanks
16:50 crab you're welcome.
16:51 D4RK-PH0ENiX joined #mojo
16:54 d4rkie left #mojo
17:03 stephan48 mh
17:06 crab mh? how old-fashioned.
17:07 stephan48 the mh shouldnt go here
17:09 spleenjack1 left #mojo
17:33 marcus sri: Did you consider showing posted params in post requests in debug mode? That's one of my biggest mojo annoyances compared to working with catalyst.
17:39 perlrocks Twitter: "Nice: RT @kraih #mojolicious bonus hack of the day: "mojo get digg.com 'h3.story-item-title > a[href]' text" #perl" --phillipadsmith http://twitter.com/phillipads​mith/status/75255045008015360
17:39 d4rkie joined #mojo
17:40 Akron left #mojo
17:41 arpadszasz left #mojo
17:43 ysyrota left #mojo
17:43 D4RK-PH0ENiX left #mojo
17:49 fhelmber_ left #mojo
18:23 crab blargh
18:24 crab marcus: show where, in the exception template?
18:25 D4RK-PH0ENiX joined #mojo
18:29 d4rkie left #mojo
18:30 kaare left #mojo
18:46 sh4 left #mojo
18:47 d4rkie joined #mojo
18:51 D4RK-PH0ENiX left #mojo
18:58 sugar left #mojo
19:01 sugar joined #mojo
19:13 mattastrophe left #mojo
19:14 D4RK-PH0ENiX joined #mojo
19:18 d4rkie left #mojo
19:31 mattastrophe joined #mojo
19:50 d4rkie joined #mojo
19:55 D4RK-PH0ENiX left #mojo
19:57 D4RK-PH0ENiX joined #mojo
20:01 d4rkie left #mojo
20:08 Foxcool left #mojo
20:22 perlite_ joined #mojo
20:25 perlite left #mojo
20:26 perlite_ is now known as perlite
20:26 Foxcool joined #mojo
20:32 sugar left #mojo
20:33 d4rkie joined #mojo
20:37 D4RK-PH0ENiX left #mojo
21:18 gbacon left #mojo
21:18 D4RK-PH0ENiX joined #mojo
21:22 Foxcool left #mojo
21:22 d4rkie left #mojo
21:24 arthas left #mojo
21:36 alnewkirk is there a markdown plugin?
21:37 d4rkie joined #mojo
21:38 perlrocks Twitter: "#websockets will be back in #firefox 6, and it's the same protocol version #mojolicious uses already! :) http://t.co/tbYLrRW #perl" --kraih http://twitter.com/kraih/status/75315178429878272
21:38 sri finally
21:39 sri latest aurora has ietf-07 websockets
21:41 D4RK-PH0ENiX left #mojo
21:46 sri marcus: feel free to make it a plugin ;)
21:48 D4RK-PH0ENiX joined #mojo
21:51 jdixon joined #mojo
21:51 jdixon left #mojo
21:52 d4rkie left #mojo
23:06 jwang joined #mojo

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