Camelia, the Perl 6 bug

IRC log for #mojo, 2011-06-24

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

All times shown according to UTC.

Time Nick Message
00:14 mattastrophe left #mojo
00:23 random joined #mojo
00:23 random left #mojo
00:31 crab "look for delicious pastries in the jar"?
00:31 crab pastries? in a cookie jar?
00:39 alnewkirk left #mojo
00:49 gabo2 joined #mojo
00:53 mattastrophe joined #mojo
00:55 gabo2_ joined #mojo
01:00 gabo2 left #mojo
01:20 perlrocks Twitter: "/ Mojolicious Reference determine where the warning occurred during automated testing - Introduction to Perl with sample code (id: perlcodesample / @ perlcodesample) http://t.co/C5uIr44 # perl # mojolicious" (ja) --perlcodesample http://twitter.com/perlcodesa​mple/status/84068436011003904
01:21 D4RK-PH0ENiX joined #mojo
01:22 perlrocks Twitter: "Find warning location in test script / Mojolicious reference (id: perlcodesample / @ perlcodesample) http://t.co/C5uIr44 # perl # mojolicious" (ja) --perlcodesample http://twitter.com/perlcodesa​mple/status/84068727997464578
01:24 d4rkie left #mojo
01:47 perlrocks Twitter: "perlcodesample: / Mojolicious Reference http://bit.ly/jrIC24 determine where the warning occurred during the automatic test" (ja) --perlironman http://twitter.com/perlironm​an/status/84075047047794688
02:32 alnewkirk joined #mojo
03:28 perlrocks Twitter: "/ Mojolicious reference test in automatic test data separate JSON - Introduction to Perl with sample code (id: perlcodesample / @ perlcodesample) http://t.co/KtAk1Ba # perl # mojolicious" (ja) --perlcodesample http://twitter.com/perlcodesa​mple/status/84100645791084544
03:29 perlrocks Twitter: "Test json each data element / Mojolicious refernce (id: perlcodesample / @ perlcodesample) http://t.co/KtAk1Ba # perl # mojolicious" (ja) --perlcodesample http://twitter.com/perlcodesa​mple/status/84100918102073344
03:54 perlrocks Twitter: "perlcodesample: / Mojolicious Reference http://bit.ly/iVqTgQ individual test data in JSON automatic test" (ja) --perlironman http://twitter.com/perlironm​an/status/84106980293222400
04:42 gabo2_ left #mojo
04:48 dwierenga left #mojo
04:49 dwierenga joined #mojo
05:05 * sri yawns
05:08 GitHub53 joined #mojo
05:08 GitHub53 [mojo] kraih pushed 1 new commit to master: http://bit.ly/jSZWSR
05:08 GitHub53 [mojo/master] fixed typo - Sebastian Riedel
05:08 GitHub53 left #mojo
05:24 alnewkirk left #mojo
05:31 D4RK-PH0ENiX left #mojo
05:32 d4rkie joined #mojo
05:46 marcus crab: these are not the pastries you are looking for.
05:50 AmeliePoulain joined #mojo
05:54 GitHub125 joined #mojo
05:54 GitHub125 [mojo] kraih pushed 1 new commit to master: http://bit.ly/imVnFi
05:54 GitHub125 [mojo/master] fixed support for multiple checkboxes with same name in Mojolicious::Plugin::TagHelper - Sebastian Riedel
05:54 GitHub125 left #mojo
05:57 sri after all the talk about pastries i need breakfast :o
06:01 crab i haven't had any breakfast yet
06:02 gabo2 joined #mojo
06:21 * marcus is already at the office
06:22 marcus with two pieces of bred and 2 cups of coffee in my tummy
06:23 koban joined #mojo
06:25 kmx joined #mojo
06:41 lammel joined #mojo
06:53 perlrocks Twitter: "Start Mojolicious / PSGI application: a mini-test performance. http://koorchik.blogspot.com/​2011/06/mojoliciouspsgi.html" (ru) --koorchik http://twitter.com/koorchi​k/status/84152115290841088
07:04 sri OMG
07:04 sri FUTURAMA IS BACK!
07:04 tardisx :-)
07:04 tardisx x 2
07:04 sri \o/
07:04 * sri faints
07:05 sugar joined #mojo
07:08 marcus sweet baby jesus, pass the beans!
07:16 gabo2 left #mojo
07:21 perlrocks Twitter: "If you're publishing web server/framework benchmarks, please do it properly so we can all benefit. http://t.co/Zr9SflU #perl #mojolicious" --kraih http://twitter.com/kraih/status/84159160203231232
07:22 xaka joined #mojo
07:23 sri i can't link that blog post often enough
07:24 xaka hi folks. Let's assume i have ULR /api/Type1/:1/Type2/:2, i want to grab (/Type1/:1/Type2/:2) into stash called "path" and use it as value for the next internall call. The question is how to grab it in an easy way? Actually i may have more than Type2, like a Type3, ..., TypeN
07:25 sri path is reserved
07:25 xaka it's ok, i can use different name, i want to understand how to do it :)
07:26 xaka how to grab it into some variable
07:26 sri /api/*foobar
07:26 sri my $foobar = $self->param('foobar')
07:26 moritz $self->param(mypath => $self->req->url->path)
07:27 sri that would be the whole path
07:27 xaka but it will grab everything, i'll have diff handlers for /api/Type1/:1, /api/Type1/:2/Type2/:2, ...
07:27 sri he said it has a prefix
07:27 sri xaka: ok, you lost me there
07:27 xaka sri, sorry
07:27 moritz xaka: do you already have routes for it?
07:30 xaka moritz: no, i don't because i don't know how to do it :) actually i can use your way via req->url->path and just strip "api" from the beginning
07:32 xaka may be i can put some "before-hook" which will do it for me (strip "api")? But i need this hook only for requests under "/api". Is it possible to define such hook?
07:32 moritz xaka: there's the "under" built-in (see the Mojolicious::Lite tutorial)
07:33 sri i think we should actually understand the problem first
07:33 sri because i still don't get it
07:33 moritz under '/api/' => sub { my $self = shift; $self->param(mypath => strip_prefix($self->req->url->path)) }
07:33 sri and the proposed solutions so far seem horrible
07:34 moritz sri: oh come on, understanding problems is so web 1.0 :-)
07:34 xaka . /api/Type1/:1 -> handler_1, /api/Type1/:1/Type2/:2 -> handler_2, ... all of this handlers must have "my_path" variable with a path value without "api" prefix
07:34 sri seriously, if you touch $self->req->url->path there has to be a really really good reason
07:35 sri ok, what is /api/Type1/:1/Type2/:2?
07:35 xaka route template
07:35 sri are :1 and :2 placeholders or the actual path?
07:35 xaka placeholders
07:35 purl placeholders is, like, the '?' in INSERT INTO archive VALUES(?, ?, ?, NOW(), NULL)
07:36 sri ok, then i don't see the problem
07:36 sri what you're showing are two perfectly fine routes
07:36 sri they work just like that already
07:38 xaka sri: true, i just need a generic way to grab path, strip "api" prefix and put it into stash "my_path". I think "under" will be usefull, isn't?
07:38 xaka i mean i don't want to strip "api" inside every handler
07:39 xaka just because i'm too lazy :)
07:39 mattastrophe left #mojo
07:40 sri ok, now i get it
07:40 sri under '/api';
07:40 sri that's all
07:40 sri add that before your routes and you're good
07:40 mattastrophe joined #mojo
07:40 sri :)
07:41 xaka cool, i'll try, thx guys
07:41 sri http://mojolicio.us/perldoc/Mojolicious/Lite#Under # it's even documented
07:41 sri see second example, prefixing
07:42 marcus copying 6x15 Benderama.avi to my linux desktop box
07:42 marcus today will be sooo productive!
07:42 sri MOAR QUOTES!
07:42 sri also a new show... wilfred
07:43 sri looks interesting
07:44 marcus http://www.youtube.com/watch?v=SM5ouH9xotk ?
07:45 marcus it's frodo!
07:46 marcus You're all terrible an incompetent. I resent tha*CRASH*
07:46 sri fordo and a guy in a dog costume, has to be awesome!
07:46 marcus it's worth a shot
07:46 marcus adding to sickbeard
07:52 marcus True Blood almost starting again as well, and Weeds.
07:52 sri yay
07:52 marcus summer is looking up :)
07:53 sri need my scifi fix though :/
07:53 marcus Wonder when I will have time for all these WWDC videos that was released
07:54 sri unbelieveable how they could kill stargate completely
08:03 cosmincx left #mojo
08:04 cosmincx joined #mojo
08:11 sri just vampires and werewolves everywhere... so annoying
08:13 sri falling skies has potential, but will get canceled
08:26 phips left #mojo
08:41 marcus sri: haz failure on 5.14.0 - http://paste.scsys.co.uk/115729
08:41 marcus in freebsd jail
08:46 marcus warehouse 13 still runs??
08:49 sri marcus: no idea, feel free to debug
08:49 sri don't like warehouse 13 anymore
08:49 marcus sri: I'm pretty sure it's due to your assumptions about the network interfaces, I just forced it
08:50 sri marcus: don't know, never seen that error though
08:51 marcus sri: guess it's jails related
08:52 sri could be sockhost resolving to something else than 127.0.0.1
08:52 marcus yep
08:52 sri if you know a fix feel free :)
08:52 marcus they don't actually configure lo0 to 127.0.0.1 in the vservers
08:52 sri you're in the unique position to test it
08:52 marcus I am truly blessed
08:52 marcus ;)
08:53 sri 127.0.0.1 seems to work though, otherwise the tests would break
08:53 sri since we hardcoded localhost to 127.0.0.1
08:54 sri in the resolver
08:54 sri (to avoid horribe horrible ipv6 bugs)
08:55 sri s/the/all/
08:56 spleenjack joined #mojo
08:58 fmerges joined #mojo
08:59 marcus local_address
08:59 marcus sri: 127.0.0.1 does not work on a freebsd vserver, because the source will be the vserver ip, not localhist
08:59 marcus localhost
08:59 marcus like illustrated in my nopaste above
09:00 sri that's what i said
09:01 marcus sri: if I change it to use local_address instead, it would get the right address
09:01 marcus but you're saying that would break ipv6 shit?
09:02 sri nope
09:02 sri i was talking about the client side, unrelated to the test
09:03 sri 127.0.0.1 works for connect
09:05 marcus sri: http://paste.scsys.co.uk/115733 <- all tests pass
09:07 marcus actually, just that test. this still fails :) - t/mojo/command.t .............................. 1/17 Can't chmod path "/tmp/KLGktXCILA/bar/baz.txt": Inappropriate file type or format at t/mojo/command.t line 77
09:07 marcus cannot remove path when cwd is /tmp/KLGktXCILA for /tmp/KLGktXCILA:  at /usr/local/lib/perl5/5.14.0/File/Temp.pm line 902
09:07 marcus guess that's the one you just added
09:08 sri seems it needs a chdir before exit
09:12 marcus yepp
09:18 sri just send a pull request
09:20 marcus eh
09:21 marcus I did that on the production system. Is it such a hassle for you to apply a patch?
09:24 sri pull requests alow discussions about patches, i want to encourage that
09:26 crab i wish i could just post patches to the mailing list.
09:29 sri DINOSAURS!
09:29 purl dinosaurs are extinct because they lacked a space program. or http://www.photobasement.com/j​esus-probably-rode-dinosaurs/
09:31 sri i really want to use the github workflow consistently
09:32 sri if you insist i'll apply the patch... but i think i really shouldn't :S
09:36 sri anyway, why do you guys dislike pull requests?
09:45 xoma joined #mojo
09:45 GitHub187 joined #mojo
09:45 GitHub187 [mojo] kraih pushed 1 new commit to master: http://bit.ly/l2hyjg
09:45 GitHub187 [mojo/master] fixed portability issues in lite_app.t and command.t - Sebastian Riedel
09:45 GitHub187 left #mojo
09:47 sri personally i wouldn't mind patches via mailing list, but i'd like to follow one workflow consistently so people from the outside can follow it
09:47 sri s/follow/use/
09:48 sri nopasted patches just suck, when i don't have time to apply them right away they just get lost
09:48 sri and discussing them is usually also no option
09:50 sri actually i don't know many projects that still use -dev mailing lists for patches
09:51 marcus sri: I dislike pull requests, because then I have to commit it to my fork
09:51 marcus which is much more work than I did now, where I could just get master, and fix the issue, and git diff
09:51 marcus specially when I did it on another machine which does not have my ssh keys and stuff
09:52 moritz the conclusion is that we need a simpler way for making pull requests
09:52 marcus yepp
09:52 marcus I like when stuff goes into pull requests
09:52 marcus but I'd like to be able to make a pull request simply from a diff :)
09:52 sri that would be nice
09:54 marcus did a feature request in #github
09:54 * sri crosses fingers
09:54 sri can't you already edit a file and make that a pull request?
09:55 marcus fork and edit this file?
09:55 marcus looks like it
09:55 purl No it doesn't, shut your hole!
09:55 * marcus spanks purl
09:55 purl oh, marcus, you just want to make my fanny turn pink and watch me cry!
09:55 marcus purl: YES!
09:55 purl marcus: huh?
09:56 marcus stupid bot...
09:56 purl Bad programmer, no cookie!
09:56 * moritz prefers purl-free channels
09:56 marcus moritz: :-o
09:57 marcus but purl's our gurl!
10:01 sri yea, you can use fork and edit this file
10:01 sri and just paste in the new version
10:01 sri for those small single file changes
10:03 GitHub67 joined #mojo
10:03 GitHub67 [mojo] kraih pushed 1 new commit to master: http://bit.ly/mGPgVh
10:03 GitHub67 [mojo/master] updated changes - Sebastian Riedel
10:03 GitHub67 left #mojo
10:07 sri marcus: https://github.com/marcusramberg/mojomojo/pull/79 # :P
10:08 sri it's a 3 step process
10:09 sri click button once and edit file, write commit message, and finally a pull request message
10:10 sri actually, you click 4 buttons
10:10 marcus sri: TOO MANY BUTTONS, AND NOT ENOUGH MCs
10:11 sri not a bad experience though
10:11 sri like editing a wiki
10:12 sri and you can even green button apply them
10:13 sri Y U NO APPLY PATCH?!!!
10:22 sri ohoh
10:22 sri team fortress 2 is free now... there goes the weekend
10:22 marcus APPLIED
10:22 sri \o/
10:25 xantus[] left #mojo
10:27 bosphorus joined #mojo
10:36 perlrocks Twitter: "@ Alekseevsasha everything else) nginx, Starman, Mojolicious, Perl, JavaScript" (ru) --sharifulin http://twitter.com/shariful​in/status/84208210050949120
10:38 xantus[] joined #mojo
10:42 * sri wonders how good safari 6 will be
10:43 sri FF5 has broken ui, chrome can't open pause.perl.org and the web developer extension is broken... and safari 5 is slow :S
10:43 sri *+a
10:45 marcus the future is so bright I gotta wear shades.
10:51 Akron joined #mojo
10:51 marcus hmm, seems JSON::XS isn't building on 5.14.0 :(
10:52 marcus actually, it there's test passes, weird
10:54 perlrocks Twitter: "/ Mojolicious reference http://goo.gl/7HpsV individual test data in JSON automatic test" (ja) --ItSANgo http://twitter.com/ItSANgo​/status/84212795465412608
10:55 marcus ah, needs devel makemaker
10:55 * sri switches back to chrome canary as default browser
10:59 lammel left #mojo
11:04 sri oh, rindolf is now maintaining xml::libxml
11:22 marcus :o
11:22 * marcus phears
11:22 cosmincx left #mojo
11:22 cosmincx joined #mojo
11:23 marcus hmm, seems a basic catalyst local::lib is 17M
11:31 sri wow
11:31 sri mojolicious was 500k or so
11:37 bosphoru_ joined #mojo
11:38 marcus that's including Catalyst::Devel tho
11:38 marcus but still
11:39 marcus bet it'll be a lot bigger by the time all the iusethis dependencies are installed :)
11:39 bosphorus left #mojo
11:54 bosphorus joined #mojo
11:58 bosphoru_ left #mojo
11:58 GitHub185 joined #mojo
11:58 GitHub185 [mojo] kraih pushed 1 new commit to master: http://bit.ly/mpRiui
11:58 GitHub185 [mojo/master] release preparations - Sebastian Riedel
11:58 GitHub185 left #mojo
12:02 perlrocks Twitter: "Mojolicious 1.48 by KRAIH - http://metacpan.org/releas​e/KRAIH/Mojolicious-1.48/" --cpan_new http://twitter.com/cpan_ne​w/status/84229909035237378
12:03 perlrocks Twitter: "Released #mojolicious 1.48 with a few smaller bugfixes and improvements. http://t.co/OWtVV7t #perl" --kraih http://twitter.com/kraih/status/84230256378126336
12:05 sri i want to get some feedback for the command.t test, no better way to get those than to release ;p
12:06 sri that sentence does not sound right, hmm
12:07 sri anyway, looking forward to whining from windows users
12:08 fhelmber_ left #mojo
12:36 sri but now is futurama time
12:36 sri ALL GLORY TO THE HYPNOTOAD!
12:38 marcus I liked the second one the best
12:38 sri argh...
12:39 sri now i have to go shopping for the weekend :S
12:40 marcus why? Are stores closing?
12:43 sri naah, just some bbq stuff i forgot to buy
12:45 * sri wonders how to say "im angebot" in english
12:45 sri it's cheaper today :)
12:45 espent_ is now known as espent
12:52 moritz sri: FOR SALE!!11!!
12:52 moritz sri: though usually they say "special discount"
12:53 sri ah right, steaks are FOR SALE!!11!! today
12:57 sugar left #mojo
12:59 xaka i'm not sure, but i think that /URL/ and /URL are different URLs (with and without ending slash). Mojo handles both if route looks like "/URL". Is it correct? I think there must be a redirect at least
12:59 sugar joined #mojo
13:03 moritz why should there be a redirect?
13:03 xaka or 404, i'm not sure
13:04 xaka i mean that URLs are different and there should be an option or documentation about such behaviour like in other web-servers and frameworks
13:22 perlrocks Twitter: "♺ @kraih: Released #mojolicious 1.48 with a few smaller bugfixes and improvements. http://t.co/OWtVV7t #perl" --Metztli_IT http://twitter.com/Metztli_​IT/status/84250165069873152
13:23 mattastrophe left #mojo
13:33 arpadszasz joined #mojo
13:44 AmeliePoulain left #mojo
14:00 xoma left #mojo
14:40 Foxcool left #mojo
14:43 Foxcool joined #mojo
14:44 sri xaka: what would be the point?
14:45 koban left #mojo
14:47 xaka sri: i was working with a many frameworks/web-servers and i learned if u said "/URL" then there is no "/URL/" unless u set an option. I was expecting the same from Mojo, but it got me down :) application didn't expect an ending slash
14:48 sri why would you ever differentiate between the two?
14:48 sri what would mojolicious gain by doing it?
14:48 sri i actually think you're exaggregating
14:49 sri apache for example allows both forms when serving static files and directories
14:49 sri always has
14:49 xaka for the same reason browsers never add "/" to the url path if you didnt specify it by yourself
14:50 * sri doesn't follow
14:50 sri why should we do it? what do we gain?
14:52 sri i know that by handling both the same we do gain simplicity
14:52 sri what could outweight that?
14:53 spleenjack left #mojo
14:53 xaka i think because people expecting it. actually it's a different url paths. yes, u can say that only me crying about it, but just because i was first who is blamed by it, like any other hidden bug or unexpected behaviour which u don't know about yet
14:53 sri fact is nobody expected it so far
14:53 spleenjack joined #mojo
14:54 sri everybody just wants their routes to work, if they get a free second one with slash doesn't matter
14:55 sri anyway, how did you get bitten by it?
14:55 sri what was your use case?
14:56 xaka i use url path as dbus path to have an access to some seviec, i'm like a proxy. So, dbus doesn't allow ending slashes :) and i didnt expect it too, but my so-developer added it and found an issue
14:56 sri not a common use case at all
14:56 sugar left #mojo
14:57 sri but easy enough to handle
14:57 sri $self->req->url->path->trailing_slash(0);
14:57 sri and you'll never have an ending slash
14:58 sri routes don't care about slash or not, but we keep the information around for those 0.001% cases
14:59 xaka heh, magic and only u know about it ;) thx for sharing. Your perldoc very usefull, but for common stuffs. I mean there is no link to Request object, Response object, Path object where i can get information
15:00 sri it's all in the documentation
15:00 xaka http://mojolicio.us/perldoc​/Mojolicious/Guides/Routing - nothing about trailing
15:01 xaka http://mojolicio.us/perldoc - no one link to Request, Response, Path, URL objects
15:01 MisterHatt the mojo docu is like that, covers most things but occasionally you need to RTFS
15:01 MisterHatt in my exp at least, but it's always getting more and more detailed and complete
15:02 xaka MisterHatt: yes, that's true. i believe that sry knows more magic then we're all together, but he should share it
15:02 xaka *sri
15:03 sugar joined #mojo
15:03 MisterHatt if sri is a magician and we also have perlninja, I wonder what that makes moritz
15:03 MisterHatt pirate?
15:03 purl hmmm... pirate is a career that is washed up these days...and raping and pillaging just doesn't have a good reputation these days.... or http://www.eff.org/IP/DRM/piratead/CEA_ad.png or http://www.wired.com/politics/securi​ty/magazine/17-07/ff_somali_pirates or PIR parser (and compiler) implemented in NQP http://github.com/bacek/pir or http://tweetphoto.com/28970505
15:03 sri xaka: http://mojolicio.us/perldoc/Mojolicious/Lite#HTTP # this starter section links to all important classes
15:04 sri from the messages you'll get links to more specific ones and so on
15:04 xaka sri: dont you think that they should be on the main page? people expecting it there
15:04 sri NO!
15:04 xaka especially for the fast access
15:05 sri what would be the point to have a huge list of 50 class links?
15:05 sri if you want that just use search.cpan.org
15:05 Akron left #mojo
15:05 xaka ok ok ;) it's your deal
15:05 sri higher level documentation is a guided introduction
15:05 xaka i'm just using it and nothing more, who cares about my .50 cents
15:06 sri reference documentation is lower level
15:06 xaka i dont think so, request, response are high-level and mostly used objects so their docs should be accessible in a very easy way
15:07 xaka like a 1+1 = 2, not like a sqrt(pow(log(mod(5/2))))
15:07 cosmincx left #mojo
15:08 sri i'm out of the conversation btw.
15:08 xaka sure, you are welcome
15:08 sri not because i don't care, but because of the attitude
15:09 sri everybody here knows how much i care about improving documentation
15:09 xaka that's why u dont want to put mostly used doc parts on the top?
15:13 xaka 99% frameworks start documentation from the basis, request and response. What it can and provides. How to use it and so on. Request and Response. And you say that it's a low-level part which is nobody interested in so they must try to solve rebus and find it somewhere really deep
15:14 xaka tell me if i wrong, if req/res useless and nobody need it
15:16 xaka as i said, Mojo doc is very very readable and friendly as no one else, but sometime it's a difficult to find what u need
15:25 kaare joined #mojo
15:30 mattastrophe joined #mojo
15:32 perlrocks Twitter: "Blog # Plack wrote in mojolicious / Mojolicious Application:: Plugin to plug Middleware - jamadam weblog2 http://htn.to/MLCqzK" (ja) --jamadam http://twitter.com/jamadam​/status/84282629704265728
15:37 sri wow
15:37 sri jamadam++
15:37 sri that's really clever
15:37 sri https://github.com/jamadam/Mojolicious-​Plugin-PlackMiddleware/blob/master/lib/​Mojolicious/Plugin/PlackMiddleware.pm
15:38 bosphorus left #mojo
15:51 mattastrophe left #mojo
15:52 cosmincx joined #mojo
15:54 perlrocks Twitter: "Compliments to the author of Mojolicious, goody. I could not be less clever" (ja) --jamadam http://twitter.com/jamadam​/status/84288253414486017
16:06 mattastrophe joined #mojo
16:10 spleenjack left #mojo
16:11 arpadszasz left #mojo
16:13 moemoe left #mojo
16:13 xaka is there any way to define common namespace for all sub-routes? my $api = $app->routes->route("/api")->namespace(...); $api->route(...)->to(...); $api->route(...)->to(...)?
16:23 xaka sri: what do you think about using nearest parent's namespace value if current is undefined and neares parent is marked as a bridge/waypoint/under?
16:25 xaka sri: or you can introduce something new like a bridge/... which will just keep namespace for such purposes. I have many routes under "/api" parent and they all have the same namespace so i dont want to define it for every, i want to use parent's value
16:26 yko xaka, what do you mean under 'namespace' ?
16:28 xaka App::Controller::API is a namespace for all controllers/routes under "/api". So i can write $api->route(...)->to('class#action') instead of ->to(namespace => '...', action => '...'). I have many $api->route(...) calls and for everyone i have to specify the same namespace value
16:29 cosmincx left #mojo
16:29 sugar left #mojo
16:29 yko so what prevents you from defining namespace in '/api' route and create all children nodes using it?
16:29 xaka it doesn't work
16:29 purl It's a Y2K error!  Panic!  Sue!
16:30 xaka current route namespace isn't propogated to children
16:30 xaka children don't inherit namespace value from parent, children use its own
16:31 yko are you sure?
16:31 purl You still have ALL THREE lifelines left!
16:31 xaka checked twice + checked code
16:32 xaka i mean Mojo::Routes code
16:32 kaare left #mojo
16:33 xaka i think bridge/waypoint/under could be use for such stuff because they're kind of "routes collector" or "routes context" and can keep some default values for all children routes
16:34 xaka yko: what do u think? can it be useful?
16:35 yko actually I think that you just lied to me
16:35 yko because it works
16:36 j3nnn1 joined #mojo
16:36 xaka hm, i have 1.41 version and it doesn't :(
16:36 yko https://gist.github.com/1045160
16:37 yko script/foo get /api/nested
16:37 yko Dispatching Example::Bar->nested
16:37 xaka is it the same as $r->route('/api')->namespace('Example'); ?
16:38 yko and how do you create children?
16:39 xaka $api->route('/TypeA/TypeB')->via('get')->to(class => 'TypeA::TypeB', action => 'do_something')
16:40 yko nut sure, it's up to you investigate or not
16:40 xaka so i was expecting Example::TypeA::TypeB, but it doesn't
16:43 yko well, as Steve said, don't hold it that way
16:44 GitHub96 joined #mojo
16:44 GitHub96 [mojo] kraih pushed 1 new commit to master: http://bit.ly/m0vZzN
16:44 GitHub96 [mojo/master] fixed url_for to incorporate trailing slash for current route - Sebastian Riedel
16:44 GitHub96 left #mojo
16:46 sri http://mojolicio.us/perldoc/Mojolicious/Gui​des/Routing#Route_To_Class_28_namespace_29
16:46 sri that's pretty specific about what does what
16:54 fmerges left #mojo
16:54 xaka sri: i found undocumented parameter "class" which you can pass to "to" method instead of "controller". Can i use it? Some of my controller names cannot be camilized
16:56 sri http://mojolicio.us/perldoc/Mojo​licious/Guides/Cheatsheet#class
16:57 arpadszasz joined #mojo
16:58 xaka sri: then please take a look on http://pastebin.com/7JWzs4F4 (uncommented line doesn't work - use class, commented line works fine - use namespace).
16:59 sri that's because you're not following the documentation
16:59 sri just do what yko told you earlier
17:00 xaka hm...but what i did wrong? :(
17:01 sri don't use ->namespace
17:02 sri it's only used for what the documentation says
17:02 xaka ok, then what should i use to define common namespace for children routes?
17:02 sri http://mojolicio.us/perldoc/Mojolicious/Gui​des/Routing#Route_To_Class_28_namespace_29
17:03 Drossel joined #mojo
17:03 sri that has been linked a few times now
17:03 xaka "/api" doesn't have handlers, i dont have action for it
17:04 sri ok, please read the whole routing guide from the start
17:04 sri really, it is all in there and i can't explain it better
17:04 Kulag left #mojo
17:05 xaka omg, i got it, but i didn't know that action is optional :(
17:05 xaka $r->route('/api')->to(namespace => 'App::Controller') - works great
17:06 xaka http://mojolicio.us/perldoc/Mojolicious/Gui​des/Routing#Route_To_Class_28_namespace_29 - all examples with an action parameter or similar via "class#method". That's why i was confused, i thought "action" is a mandatory
17:09 sri absolutely nothing is mandatory, that's the whole idea
17:09 sri and explained in the earlier sections
17:12 Drossel left #mojo
17:14 Kulag joined #mojo
17:29 crab hi
17:57 arpadszasz left #mojo
18:04 j3nnn1 left #mojo
18:16 Drossel joined #mojo
18:17 Kulag left #mojo
18:55 sri ho
19:09 crab it seems i'm in a code-auditing mood.
19:23 * crab runs out of code to audit
19:26 moritz crab: http://www.github.ocm/
19:26 moritz erm, https
19:26 moritz but you get the idea :-)
19:26 D4RK-PH0ENiX joined #mojo
19:27 perlrocks Twitter: "Mojolicious-Plugin-Toto 0.06 by BDUGGAN - http://metacpan.org/release/BDUGG​AN/Mojolicious-Plugin-Toto-0.06/" --cpan_new http://twitter.com/cpan_ne​w/status/84341864655880192
19:27 sri hmm
19:28 * sri is sure he recently gave crab soem code to audit
19:29 d4rkie left #mojo
19:30 j3nnn1 joined #mojo
19:31 crab sri: oh?
19:31 * sri scratches head
19:32 sri but i don't remember :/
19:36 crab well, i don't remember any such, but if you think of anything, feel free to poke me.
19:45 sri if you're really bored you could also profile a bit
19:50 sri i suppose Exceptions.pm, Path.pm, Parameters.pm and maybe UserAgent.pm could use a review
19:50 sri s/s//
19:50 sri Exception is prolly our most hackish code
19:51 edenc is now known as edenc-macbook
19:52 edenc-macbook is now known as edenc
19:52 sri Path.pm has many security implications, so always a good audit target
19:52 sri Parameters.pm was recently changed drastically
19:53 sri and UserAgent.pm has grown a lot over time and i'm not happy with the internals yet
19:54 sri crab: should be enough for a weekend :)
19:56 crab ok.
20:28 metaperl joined #mojo
20:29 d4rkie joined #mojo
20:32 D4RK-PH0ENiX left #mojo
20:58 Sjors left #mojo
20:58 perlrocks Twitter: "@ @ Renato_cron nerdson is a hint: Mojo-perl-e 'b (g ("google.com") -> dom-> at ("the "))-> say'" (pt) --creaktive http://twitter.com/creaktiv​e/status/84364852780482560
21:33 mattastrophe left #mojo
21:59 Drossel left #mojo
22:02 Kulag joined #mojo
22:03 D4RK-PH0ENiX joined #mojo
22:06 d4rkie left #mojo
22:16 Kulag left #mojo
22:26 curtis_ left #mojo
22:27 lammel joined #mojo
22:34 Kulag joined #mojo
22:34 D4RK-PH0ENiX left #mojo
22:35 d4rkie joined #mojo
23:01 bosphorus joined #mojo
23:22 xaka|2 joined #mojo
23:23 D4RK-PH0ENiX joined #mojo
23:26 d4rkie left #mojo
23:27 xaka left #mojo
23:35 d4rkie joined #mojo
23:41 D4RK-PH0ENiX left #mojo

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