Camelia, the Perl 6 bug

IRC log for #mojo, 2010-10-13

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

All times shown according to UTC.

Time Nick Message
00:16 MojoGuest871 joined #mojo
00:16 MojoGuest871 From: http://blog.kraih.com/ (1 hits)
00:23 MojoGuest871 left #mojo
00:30 vti sri: this is a good one https://gist.github.com/dbe15cc587882a9a7f13
00:31 sri vti: oh indeed
00:32 sri vti: commit it
00:35 sri think i'm in love with redis
00:36 GitHub109 joined #mojo
00:36 GitHub109 mojo: master vti * 619a2ee (3 files in 3 dirs): Fixed input tag helper escaping - http://bit.ly/cZLK3i
00:36 GitHub109 left #mojo
00:44 GitHub8 joined #mojo
00:44 GitHub8 mojo: master Sebastian Riedel * fa5d985 (1 files in 1 dirs): cleanup - http://bit.ly/9ayPSl
00:44 GitHub8 left #mojo
00:44 sri vti: almost flawless...but you forgot perltidy
00:45 sri shame on you!
00:45 sri really need to sleep
00:45 sri nn
00:45 vti nn
01:08 polvo left #mojo
02:00 perlrocks Twitter: "Mojolicious:: Lite to make chat with at WebSocket http://ow.ly/2RHIG" (ja) --Webnews_bot http://twitter.com/Webnews_bot/status/27198327432
02:11 xantus heh
02:12 xantus I can mount mojo dav with nautilus
02:35 janus left #mojo
03:13 yakudzo joined #mojo
03:19 janus joined #mojo
03:40 xantus sri: would you hurt me if I used Mojo::DOM to build an xml doc instead of just using it as a parser? :)
04:04 tholen42 joined #mojo
04:06 tl left #mojo
04:18 Kulag is now known as Arktosis
05:09 ysyrota joined #mojo
06:14 kvorg left #mojo
06:14 koban joined #mojo
06:26 ltriant left #mojo
06:41 y0j left #mojo
07:05 y0j joined #mojo
07:16 kvorg joined #mojo
07:33 spleenjack joined #mojo
08:07 perlite_ left #mojo
08:08 perlite joined #mojo
08:09 sri moin
08:10 sri xantus: no point really, just use a template to build xml
08:15 achromic left #mojo
08:17 achromic joined #mojo
08:26 vti sri: would be nice to do xmlrpc using only mojo::dom
08:26 sri that should be trivial
08:27 sri xmlrpc is very minimalistic
08:30 vti that's i want to use mojo::dom to generate xml too :)
08:30 vti *that's why
08:30 sri i don't see the point
08:30 sri there is nothing you gain by using Mojo::DOM to generate xml
08:35 sri xml is not like json where you just serialize a perl structure
08:35 sri there is no good way to "generate" xml from a structure
08:36 yakudzo ppl can some one give good example of using find->each of Mojo::DOM in ep templates.
08:37 sri it's just perl
08:37 sri each might not look good in the ep case though
08:38 yakudzo yes thats why I'm asking (:
08:39 sri use it without a callback
08:39 sri <% for my $e ($dom->find(...)->each) { %>...<% } %>
08:40 yakudzo thanks(: this think I was looking for
08:40 sri :)
08:44 GitHub18 joined #mojo
08:44 GitHub18 mojo: master Sebastian Riedel * a80daeb (1 files in 1 dirs): added example - http://bit.ly/9rpq4M
08:44 GitHub18 left #mojo
08:45 sri should be more obvious now
08:46 yakudzo after moving from XML::Simple to Mojo::DOM my code became twice smaller and readble
08:46 yakudzo (:
08:46 sri \o/
08:55 marcus_ morning
08:57 vti didn't know each returns an array
08:57 vti marcus_: утро :)
09:00 marcus_ vti: indeed.
09:01 * marcus_ almost bought an apartment
09:05 vti is it bad or good? :)
09:07 marcus_ they didn't accept my price
09:07 marcus_ nobody else bid tho
09:20 rhaen marcus_: huh, I thought you already have a house!
09:21 vti he lives on the street
09:51 marcus_ rhaen: I am renting at the moment. Sold our apartment in march
10:01 rhaen ah :)
10:01 rhaen ok.
10:01 rhaen Where do you live (in Norway, right?)
10:03 marcus_ yeah, norway.
10:03 marcus_ oslo
10:08 rhaen cool!
10:08 omega its getting cool atleast
10:09 omega not sure I'm looking forward to coming home on friday morning..
10:09 marcus_ :D
10:09 marcus_ yeah, it's freezing now
10:10 marcus_ or thereabouts
10:10 marcus_ have to scrape ice of the car windows in the morning.
10:10 marcus_ off
10:10 * omega had to go buy some travel cloths yesterday
10:10 omega damn hard when people don't speak much english, and I speak no thai
10:11 rhaen Norway is such a great country (at least for travelling) :)
10:11 rhaen marcus_: *ugh* - already that cold?
10:11 rhaen omega: haha :)
10:11 marcus_ rhaen: only in the morning
10:20 marcus_ in the day it goes all the way up to 5-6 degrees c. :p
10:23 rhaen oh, nice and warm!
10:23 rhaen Launch time!
10:46 * sri launches rhaen into orbit
11:04 dotan joined #mojo
11:15 sri the more i learn about redis the more i like it
11:18 sri much more programmer oriented than other databases
11:18 sri having actual structures to work with is quite cool
11:55 und3f joined #mojo
11:56 und3f sri, html_escape converts ' to &apos but that doesn't work in IE. http://www.w3.org/TR/xhtml1/#C_16
11:56 und3f sri what about using &#39; instead of &apos;
12:09 und3f left #mojo
12:49 sri und3f[A]: you're too late
12:53 marcus_ KILL THE WHITE MAN
13:00 daxim joined #mojo
13:01 daxim the plat_forms contest is coming up and still needs perl programmers:  https://www.socialtext.net/perl5/​index.cgi?events_2011_plat_forms
13:16 GitHub124 joined #mojo
13:16 GitHub124 mojo: master Sebastian Riedel * e4a7cee (2 files in 2 dirs): cleanup - http://bit.ly/d2NVcu
13:16 GitHub124 left #mojo
13:20 GitHub167 joined #mojo
13:20 GitHub167 mojo: master Sebastian Riedel * 151c70e (2 files in 2 dirs): cleanup - http://bit.ly/9XlUQY
13:20 GitHub167 left #mojo
13:24 sri ok, i really like redis
13:24 sri a database made for programmers
13:31 rhaen redis?
13:31 gabb key/value store
13:32 rhaen the memcache - I need xs perl module stuff?
13:32 sri redis!
13:32 gabb a better memcache
13:32 rhaen blah, memcache on steroids - I know
13:32 sri memcached on steroids
13:32 rhaen but ...no pure perl connectior
13:32 sri :D
13:32 rhaen err connector
13:32 sri of course
13:32 rhaen really?
13:32 sri it's a text protocol
13:32 gabb has a RESTful API
13:32 rhaen json?
13:32 sri don't think there is rest
13:33 rhaen no, memcache - right.
13:33 sri just data
13:33 janus hm, can i get a non-failing response even though max_redirects is reached?
13:33 sri it has structures though, which is insanely cool
13:33 gabb ah, nah no rest, was a diff thingie I saw
13:33 janus (i want to know where the redirecting server is going to send me)
13:33 dotan left #mojo
13:34 sri janus: ?
13:35 sri redis is like global variables shared between multiple computers
13:35 janus $client->max_redirects(0)-​>get($url_that_redirects) gives me an empty response
13:35 janus no code, no headers, no body
13:35 rhaen ah http://search.cpan.org/~dpavl​in/Redis-1.2001/lib/Redis.pm
13:35 marcus_ HA HO HO HO
13:35 sri janus: that sounds weird, we have good tests for that
13:36 rhaen marcus_: santa? In Norway? Really?
13:36 rhaen Already?
13:36 sri janus: not following redirects is used in most tests
13:36 janus maybe it is related to the proxy-settings... need to check the tests
13:36 sri janus: please make a test case
13:36 sri if it's a bug it will be fixed
13:36 marcus_ rhaen: Sandy Claws
13:36 janus sri: after work, need to get something done now :)
13:37 rhaen marcus_: sure - but is she web scale?
13:37 alnewkirk "web scale" :}
13:37 sri http://code.google.com/p/r​edis/wiki/CommandReference # it's really cool with arrays, sorted sets...
13:37 rhaen if she supports sharding, I will use it.
13:38 sri oh and hashes
13:38 rhaen sri: hashes?
13:38 sri HASHES!
13:38 rhaen sri: I see strings and lists
13:38 marcus_ HASH
13:38 marcus_ COOKIE
13:39 sri the simplicity of it is amazing
13:40 rhaen I will stay with smaller things - like orlite
13:41 dotan joined #mojo
13:42 sri redis is actually very small
13:42 rhaen sri: hm, how do I find my objects back?
13:42 sri ?
13:42 rhaen I am reading the manuals. hang on.
13:42 sri it's a key value store with structures
13:42 rhaen I can store my data on a key value based system cool.
13:42 rhaen ah!
13:42 rhaen ok :)
13:42 sri you use it like you would use perl arrays/hashes/strings
13:43 perlrocks left #mojo
13:43 sri thats the whole point, you can push/pop values to/from an array for a message queue for example
13:43 rhaen even multilevel hashes?
13:44 sri nope, but you can point to different keys
13:44 sri and emulate multilevel hashes
13:44 rhaen k, got that.
13:45 perlrocks joined #mojo
13:46 sri you don't just store structures, you actually manipulate them inside the database
13:47 sri and build bigger structures
13:47 sri feels very natural
13:49 sri those node.js people are hilarious
13:49 sri now lua beats them at their game and they claim it doesn't matter because node.js is not about performance but scalability xD
13:50 dotan node.js is WEB SCALE ?
13:50 sri nope
13:51 gabb lol
13:51 sri some good arguments from the lua folks though, lua is simply javascript done right
13:53 sri it's one of those langauges that really deserve more attention
13:57 DaTa what are they doing with lua?
13:58 sri learning it
14:04 marcus_ I liked that lua physics thing
14:04 marcus_ should play more with that
14:05 fish_ does the android browser has websocket support?
14:05 marcus_ löve
14:07 fish_ wanna write a mojo app with geo based webchat. thinking about going on a page and have a chat with all people in a radius of x km of you
14:07 fish_ sounds funny i think..
14:08 marcus_ I want to write something cool i löve with a Mojolicious websocket backend...
14:08 sri didn't chatroulette plan something like that?
14:09 vti who needs chatroulette when we have showmethedrawing and mojomber?
14:09 fish_ sri: do they? but i bet not with mojo ;D
14:09 sri hehe, those were funny
14:09 sri still remember when showmethedrawing was on hackernews
14:10 vti ye, we had 50+ people online
14:10 sri all drawing penises -.-
14:13 vti and i remember this iphone sucks
14:14 vti there was a picture even, let me check
14:15 vti http://vti.showmetheco.de/artorwhat.png
14:16 sri haha
14:20 vti i guess now with all those canvas libraries it's not that hard
14:22 perlrocks Twitter: "RT @punytan: @kraih i've just created a page. http://github.com/kraih/mojo/wiki/Writin​g-websocket-chat-using-Mojolicious::Lite / thanks  ..." --naoya_ito http://twitter.com/naoya_ito/status/27245598570
14:25 perlrocks Twitter: "RT @ punytan: @ kraih i've just created a page. Http://github.com/kraih/mojo/wiki/Writin​g-websocket-chat-using-Mojolicious::Lite / thanks ..." (ja) --atsukanrock http://twitter.com/atsukanrock/status/27245845308
14:39 fish_ sri: would be nice if url_for would return a ws:// link if the route is a websocket route..
14:39 sri thats complicated
14:39 sri but not impossible i guess
14:41 fish_ would be nice and pretty straight forward..
14:43 spleenjack left #mojo
14:43 rhaen ugh
14:43 rhaen that's the article I am just rewriting
14:43 rhaen :)
14:44 vti rhaen: what article?
14:44 rhaen the Writing.....
14:44 vti oh
14:45 rhaen we have two colliding translatations - I looked at them and I am about to merge them
14:45 rhaen should be finished in a few minutes
14:45 rhaen brb
14:45 vti wiki guys rock
14:55 sri indeed
14:57 fish_ are there some strange issues i should be aware of with mojo and chrome? chrome says unexspected response code 101 - but 101 should be fine if i understand that right..
14:58 sri websockets?
14:58 fish_ yes
14:58 sri could be your chrome is too old
14:58 sri the websocket situation is a mess
14:58 fish_ but it has support for it, it understand the url schema..
14:58 fish_ ah ok
14:58 sri make sure you have a draft 76 compatible browser
14:58 fish_ i'll try a newer one
14:59 sri there are multiple versions of the websocket protocol out there
14:59 sri we support the latest
14:59 sri which will break again though, because the protocol will change completely :(
15:00 fish_ oh, i apparently i use chromium.. hope the debian/testing version is recent enough
15:00 sri os x version has never been updated to draft 76 :(
15:01 fish_ sri: do you know what android 2.2 supports?
15:01 sri does it support websockets at all?
15:01 fish_ dunno =)
15:02 sri websockets are sadly not production ready at all
15:02 sri support in browsers is a total mess
15:02 sri thanks to those google idiots
15:03 sri they messed up so much with the latest handshake
15:04 sri and it will only get worse now that ietf has control
15:04 rhaen puuuh! :)
15:04 sri just take a look at the mailing list...
15:05 sri no focus at all, just hundreds of people that want websockets to solve their personal little pet project problems
15:05 punytan_ rhaen: thanks :)
15:06 sri (the websocket situation makes me as an implementor very angry)
15:06 rhaen punytan_: sorry - I had both versions and I compared them line by line - I think I have the best of both. Thanks for your great work!
15:06 sri wiki heroes++
15:06 rhaen And the world class translation! My Japanese is non-existent.
15:07 punytan_ ;)
15:07 punytan_ changed url?
15:07 rhaen huh, yep.
15:07 fish_ http://www.phpied.com/sleep-in-javascript/ <- hahahaha.
15:08 rhaen it's listed onthe startpage.
15:08 rhaen I removed your version as the initial title was: ....Mojolicious::Lite
15:09 rhaen this causes trouble when someone wants to clone the wiki on a win32 system for offline reference
15:09 rhaen Let me tweet about the new articles!
15:09 punytan_ oh, didn't notice.
15:09 punytan_ okay
15:10 rhaen sorry.
15:10 rhaen Think I will add this inside the contribution page
15:11 rhaen You can still have the '::' inside the page title - however if you start a page with that title the filenames will have :: in em
15:11 koban left #mojo
15:11 rhaen the only reasonable way to change this after a page has been created is git
15:12 perlrocks Twitter: "@ Naoya_ito now, URL http://github.com/kraih/mojo/wiki/Writin​g-websocket-chat-using-Mojolicious-Lite I slightly changed" (ja) --punytan http://twitter.com/punytan/status/27250218854
15:14 perlrocks Twitter: "We have an English translation for a websocket chat example. Thanks everyone who contributed. http://bit.ly/d2iCfm #mojolicious #perl #mojo" --rabenfeder http://twitter.com/rabenfeder/status/27250320404
15:18 kvorg left #mojo
15:20 punytan_ it was my first time writing github's wiki. so i'll do it perperly from next time.
15:20 punytan_ s/perperly/properly/
15:24 rhaen oh, nevermind. We are all new to this. I never had been into documentation - but it's fun, it's more something like social coding :)
15:30 punytan_ yeah, it's exciting
15:38 GitHub85 joined #mojo
15:38 GitHub85 mojo: master Sebastian Riedel * 42102ab (4 files in 4 dirs): fixed url_for WebSocket support - http://bit.ly/dkztI2
15:38 GitHub85 left #mojo
15:38 sri fish_: fixed
15:39 kvorg joined #mojo
15:39 sri oh actually not
15:39 sri damn
15:39 sri i'm stupid :(
15:43 fish_ i bet not so stupid as me
15:45 fish_ AWWW JAVASCRIPT... var foo = bar.baz.blub(zzz) does nothing. no error, everything fine but ofcourse i wanted new bar.baz.blub...
15:48 perlrocks Twitter: "Mojolicious:: Lite to make chat with at WebSocket - naoya http://icio.us/o4amq2 Hatena Diary" (ja) --hayajo_bookmark http://twitter.com/hayajo_b​ookmark/status/27253430035
15:54 forwardever joined #mojo
15:57 forwardever sri: is there something like a "resource" command for routes, to create a bunch of routes with one command (for crud), following certain naming conventions?
15:57 GitHub96 joined #mojo
15:57 GitHub96 mojo: master Sebastian Riedel * a123468 (3 files in 3 dirs): made url_for a lot smarter - http://bit.ly/9z10kD
15:57 GitHub96 left #mojo
15:57 sri forwardever: not yet
15:57 sri forwardever: but thought about it
15:58 forwardever sri: something like that would be helpful: http://gist.github.com/624328
15:58 sri fish_: ok, now it is really fixed
15:59 sri forwardever: agreed
16:00 vti sri: but it was so fun generating correct url when creating a new websocket project :)
16:00 * sri slaps vti
16:01 sri that slap was not for irony but because you never reported the bug ;p
16:01 vti does it work ok with ws ssl too?
16:01 sri i hope
16:02 vti it was like this https://gist.github.com/2610d1e8935eb52493b3 back in the old days
16:02 sri eww
16:03 xantus hehe
16:03 vti xantus did it in template % my $url = $self->req->url->to_abs->scheme( $self->req->is_secure ? 'wss' : 'ws' )->path( '/' );
16:03 vti :)
16:04 sri yeye, things get way too easy :S
16:04 vti but my url is safer, because i remove query
16:04 vti i remember that ws didn't want to connect when there was a query string attached
16:06 xantus__ joined #mojo
16:06 xantus heh
16:06 xantus left #mojo
16:06 xantus__ is now known as xantus
16:07 xantus new ec2 instance :)
16:09 ysyrota left #mojo
16:10 forwardever sri: okay, would add some documentation to the wiki as soon as you find some time to implement such a feature :)
16:13 sri forwardever: for now i have no plans, the feature would require countless tests
16:14 sri i would actually like to first see a crud model plugin
16:15 sri it could also first appear in a plugin
16:16 sri $self->plugin(resource => 'photos');
16:16 xantus what is this
16:16 sri see gist above
16:19 xantus sorry, lost history when I switched over
16:19 sri http://gist.github.com/624328
16:19 xantus thx
16:21 xantus :o
16:22 sri it's a railsism
16:23 forwardever put and delete methods could be a bigger issue, as some browsers might not support this, so a workaround would be needed ?
16:26 vti hidden name="_method" value="delete"
16:28 forwardever yea, http://stackoverflow.com/questions/1​65779/are-the-put-delete-head-etc-me​thods-available-in-most-web-browsers
16:29 vti so there should be some layer above mojo routes that catches that and replaces with the appropriate method
17:01 und3f[A] is now known as und3f
17:15 dotan left #mojo
17:42 MojoGuest414 joined #mojo
17:42 MojoGuest414 From: http://twitter.com/justinvi​ncent/statuses/12550383961 (1 hits)
17:43 MojoGuest414 left #mojo
17:49 vti sri: render_static works only from public directory?
17:50 vti i just discovered that i cannot render any file i want
17:50 sri vti: yes, quite sure you asked that before
17:54 vti sri: i get strange message like this https://gist.github.com/3f34db9217d692bd22b9, but that file exists, and $static->root is correct
17:55 sri permission?
17:55 MojoGuest4 joined #mojo
17:55 MojoGuest4 From: http://twitter.com/justinvi​ncent/statuses/12550383961 (2 hits)
17:56 vti 644
17:58 MojoGuest4 left #mojo
18:01 vti ok, so the problem was that i passed an absolute path
18:01 vti but it's hard to detect from a log message :D
18:22 daxim left #mojo
18:48 spleenjack joined #mojo
18:50 sri http://news.ycombinator.com/item?id=1784399 # lol?
18:56 stephen left #mojo
19:21 perlrocks left #mojo
19:21 sri seems they really want 40 perl programmers :o
19:21 perlrocks joined #mojo
19:27 xantus heh
19:28 xantus 40 beginners
19:31 DaTa yay, thay've fixed the wiki :)
19:59 stephen joined #mojo
20:15 spleenjack did you see already new emoticons from unicode 6.0? i demand a facepalm emotion!
20:16 sri we already have a few of those planned as future release code names :)
20:16 xantus If I gave you 10 pixels could you draw it?
20:19 DaTa at yapc::eu they wanted 30 and found 2 :)
20:21 stephen left #mojo
20:22 stephen joined #mojo
20:33 xantus They should focus on getting a few good ones, instead of 40 ok ones
20:36 forwardever sri: i have played around a bit with conditions (over), can you take a look at it and give some feedback http://gist.github.com/624850
20:36 sri forwardever: you are misunderstanding conditions
20:37 sri they run for every request
20:37 xantus hahaha, maybe booking.com is trying to finish perl6 :P
20:37 forwardever okay, it would work, but it would be inefficient?
20:38 sri yea, had to lol too when i saw it
20:38 sri forwardever: wouldn't work
20:38 forwardever checked it out and seems to work
20:38 sri it will crash and burn
20:39 sri it adds new routes on every request
20:39 sri you'll run out of memory
20:39 forwardever okay, now I understand
20:40 forwardever so routes itself should not be modified in conditions
20:40 sri nope
20:41 sri conditions are really just conditions
20:41 sri like i said earlier, for testing i would use a plugin
20:41 forwardever nonetheless, what is the third param that is passed my ($r, $c, $temp, $name) = @_; in my case $temp ?
20:42 sri $self->plugin(resource => 'posts'); $self->plugin(resource => 'lalala')...
20:42 sri captures
20:42 sri from routes
20:42 perlite_ joined #mojo
20:43 sri like /:controller
20:43 forwardever okay, thanks
20:47 perlite left #mojo
20:48 sri maybe we need app helpers
20:48 sri something like app->app_helper(foo => sub {...}); app->foo(...)
20:51 ltriant joined #mojo
20:56 sri or maybe vti is right and we should just allow normal helpers to be called on $app :S
20:57 sri stuff like $app->stash would crash and burn though
20:58 sri oh wait
20:58 sri there might be a sane way
21:02 xantus yay
21:06 sri hmm, way easier than expected
21:10 GitHub107 joined #mojo
21:10 GitHub107 mojo: master Sebastian Riedel * e30ca27 (2 files in 2 dirs): allow helper methods to be called from the application - http://bit.ly/aTlurK
21:10 GitHub107 left #mojo
21:10 sri vti: that should make you happy
21:10 sri but remember, it's experimental!
21:11 sri it will simply use a mock controller instance
21:12 sri forwardever: app->helper(resource => sub { shift->app->routes->... });
21:13 sri you can now do that
21:13 forwardever okay, will look at it
21:14 sri that will give you $self->resource(...)
21:16 sri i think we need a helper listing command
21:16 sri to make everything more transparent
21:21 forwardever okay, I'm new to this, so I still not know how to get post requests transformed to put and delete requests (which requires $c->req->param('_method')
21:24 und3f is now known as und3f[A]
21:24 sri that would be a before_dispatch hook
21:25 sri you simply replace ->req->method with ->req->param('_method') in it
21:28 forwardever okay, will try to understand the before_dispatch hook
21:32 kvorg left #mojo
21:54 forwardever sri: I have started with the plugin version, and it seems to work fine, can you take a look at it? http://gist.github.com/625003
21:55 sri looks ok, now just make the route generator a helper
21:56 forwardever before, I have another question, it seems that the register method is executed with every request, is that correct?
21:56 sri it is not
21:56 sri only with --reload
21:57 forwardever okay, i think I know where there problem is, will be back in a couple of seconds
21:59 forwardever where exactly has $self->plugin('resource', {resource => 'city'}); to appear, in which file?
22:01 sri i wouldn't do that anymore ;p
22:01 sri but in startup
22:01 forwardever okay, it was the --reload option, too late :)
22:01 sri just add the helper
22:02 forwardever will do that now...
22:02 sri :)
22:08 zamolxes left #mojo
22:09 zamolxes joined #mojo
22:26 rhaen heo
22:35 spleenjack left #mojo
22:37 perlrocks Twitter: "#mojolicious helpers can now also be called from the application. :) http://bit.ly/cVospN #perl" --kraih http://twitter.com/kraih/status/27282829314
22:40 sri vti: quite funny how most things i say will never happen get implemented soon after ao often -.-
22:40 sri *so
22:41 forwardever sri: not sure whether it works, in a plugin, i have before_dispatch hook, but overwriting $c->req->method() doest seem to work, but maybe just made something wrong
22:41 sri that should work flawless
22:42 MojoGuest740 joined #mojo
22:42 MojoGuest740 left #mojo
22:43 forwardever okay, nether worked with helpers before, maybe you can take a look: http://gist.github.com/625104
22:44 sri oh no
22:44 sri thats very wrong :)
22:44 forwardever okay, just tell me whats wrong :)
22:44 sri let me fix it
22:45 forwardever okay
22:49 sri http://pastie.org/1219465
22:52 sri forwardever: that should do
22:52 sri and can easily be turned into a plugin
22:57 forwardever works now, but what is the advantage over the first solution (just plugin) http://gist.github.com/625003 ?
22:58 sri it looks way better
23:01 forwardever not sure whether I get it right, the first part would go to a plugin, the second part would remain in the startup method ?
23:04 sri no
23:04 sri all goes into the plugin of course
23:06 forwardever hmm, okay, but in this case, why use a helper if I have direct access to the app (and the the routes), it seems more complicated than my first plugin draft
23:06 sri the first one is ugly
23:07 sri if you like it go for it, but it won't attract that many users
23:08 sri what i'm aiming for is $self->plugin('resourceful_routes'); $self->resource('foo'); $self->resource('bar');
23:13 forwardever like that, still do not understand why putting something in a helper method looks better, but I can live with that :)
23:13 forwardever one question regarding the naming left:
23:14 sri it's not the putting it into a helper method, it is the actual use case here
23:14 sri the end user api
23:14 sri thats what i design around
23:15 sri $self->resource('foo')
23:15 sri thats just pretty
23:15 forwardever let me look at me plugin again, I start to understand what you mean
23:15 forwardever *my
23:17 forwardever now I got it, of course, $self->resource was not possible in the first case
23:17 forwardever agree, helper is much better :)
23:19 forwardever in case of delete, people are located, e.g. to controller foo, method delete, is that okay or might there be problems as perl already has a delete function?
23:19 sri called as a method it should be fine
23:19 sri not pretty though
23:20 sri maybe look up how methods are named in rails :)
23:21 forwardever :)
23:21 forwardever I think it's destroy in rails
23:37 tardisx left #mojo
23:37 tardisx joined #mojo
23:39 forwardever http://gist.github.com/625201
23:40 forwardever need some sleep, good night
23:45 forwardever left #mojo

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