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

IRC log for #mojo, 2014-04-20

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

All times shown according to UTC.

Time Nick Message
00:30 neyasov__ joined #mojo
01:05 klapperl_ joined #mojo
01:13 d4rkie joined #mojo
01:17 basiliscos joined #mojo
01:26 asarch joined #mojo
01:36 balazs joined #mojo
01:55 alnewkirk joined #mojo
01:55 good_news_everyone joined #mojo
01:55 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/lHGoAQ
01:55 good_news_everyone mojo/master bf57785 Sebastian Riedel: fixed typo in documentation
01:55 good_news_everyone left #mojo
02:18 davido___ joined #mojo
02:37 cfedde joined #mojo
03:41 beyondcreed joined #mojo
05:19 sujithm joined #mojo
05:35 tadegenban joined #mojo
05:37 tadegenban hi, I'm new to mojo, Does Mojolicious::Lite has method secret? or secrets?
05:38 tadegenban app->secret('MicroCMS791');
05:38 tadegenban this line will cause error, why?
05:41 tadegenban Can't load locate object method "secret" via package "Mojolicious::Lite"
05:46 tianon http://mojolicio.us/perldoc/Mojolicious#secrets
05:46 tianon secret was deprecated quite a few versions ago :)
05:46 tianon in favor of the more flexible plural version
05:47 tianon that allows for a gradual deprecation of a compromised secret instead of requiring that it be culled hard all at once
05:49 tadegenban tianon: thanks for your explain, it's helpful
05:49 tianon :)
05:53 tadegenban tianon: is '/(.user)/post' .user is deprecated too?
05:55 tianon it looks like that syntax was deprecated quite a long time ago
05:55 tianon 2.82  2012-04-16 - Deprecated relaxed placeholders "/(.foo)" in favor of "/#foo".
05:56 tianon (which comes directly from the Changes file ;))
05:56 tianon https://github.com/kraih/mojo/blob/bf5778576414537d524881488107277bbabaddb2/Changes#L1305
05:56 neyasov__ joined #mojo
05:58 tadegenban tianon: thanks again :)
06:40 Vandal joined #mojo
08:12 sh4 joined #mojo
08:43 denis_boyun joined #mojo
08:56 cpan_mojo Mojolicious-Plugin-CacheMoney 0.03 by AMIRITE - http://metacpan.org/release/AMIRITE/Mojolicious-Plugin-CacheMoney-0.03
09:01 mishantil joined #mojo
09:07 met joined #mojo
09:16 batman jberger: i will merge the mandel branches soon. let me know if you object or want to review.
09:20 dod joined #mojo
09:29 basiliscos joined #mojo
09:41 hummeleBop joined #mojo
10:04 met uhm.. would being able to do something like $route->find('controller#action') make sense?
10:05 met i find myself naming routes that way often, but i was wondering if i'm missing better ways?
10:13 batman met: there's no drawback in naming routes.
10:19 met true.. besides, a shortcut to do both to('controller#action') and name() should help with the route setup clutter
10:19 batman what do you mean?
10:20 met i end up setting up routes with ->to('controller@action')->name(
10:20 batman and?
10:20 met ->to('controller#action')->name('controller#action')
10:20 met to be able to use url_for 'controller#action' instead of the autogenerated names or path..
10:20 batman of. that's no good :(
10:20 met but then it's a bit messy as the number of routes grow.. :)
10:21 batman you need to name your routes so they don't care about controller/action
10:21 met oh, what am i missing? :)
10:21 batman like ->to("user#login")->name("login");
10:21 batman you should be able to move your code around and still keep the name()
10:22 batman like ->to("user#login")->name("login_normal_user"); # if you want something more specific
10:22 met well, i do have some short ones as well.. but i rarely move the actions around..
10:22 batman this is so you can keep all the route names even if you decide to move all your User.pm code into Admin.pm
10:22 batman that's not the point.
10:22 met i get what you mean, though
10:23 batman even if you just move one action around pr. year, you should still not use ->name("controller#action");
10:24 batman i've seen/used ->name("user.login"); which is a bit better.
10:28 met you mean it's better to avoid '#' as a separator?
10:31 met in any case.. i see the point on not addigning names automatically using action/controller pairs to allow to move code around.. i guess i still find it less annoying than having lots of ->name() calls around to remember :P
10:35 dotan joined #mojo
10:41 sujithm joined #mojo
10:49 irq joined #mojo
11:12 batman i'm just saying that i would avoid doing a hard coupling between the controller/action and name
11:12 basiliscos joined #mojo
11:12 batman i often do ->name(...) => "login", "logout", "register", "account", "profile", "list_users", ....
11:17 d4rkie joined #mojo
11:20 sujithm_ joined #mojo
11:25 met batman: yes, i see the benefit to that, not denying your point.. and thanks for the help/advice :)
11:25 batman you're welcome :)
11:26 meshl joined #mojo
11:50 d4rkie joined #mojo
11:51 mire joined #mojo
12:54 gryphon joined #mojo
13:07 mire joined #mojo
13:13 met joined #mojo
13:30 sri a little too much generalizations for my taste, but action composition in play framework is indeed interesting http://iankent.co.uk/2014/04/20/action-composition-in-mojolicious
13:31 sri the whole return future from action thing should be trivial with the around_action hook
13:34 sri the whole easier to follow argument doesn't work out in perl i believe though... since you quickly end up with a huge stack of nested closures, which are all anonymous
13:35 sri at least in the cutesy keyword version
13:51 sri on a related note, i'm open to suggestions for features that make routing easier to debug
13:54 neyasov__ joined #mojo
14:12 Vandal joined #mojo
14:18 cpan_mojo Mojolicious-Plugin-CORS 0.02 by AMIRITE - http://metacpan.org/release/AMIRITE/Mojolicious-Plugin-CORS-0.02
14:29 cpan_mojo Mojolicious-Plugin-Documentation 0.03 by AMIRITE - http://metacpan.org/release/AMIRITE/Mojolicious-Plugin-Documentation-0.03
14:43 genio I haven't yet run into his described problem with routes.  I think they're pretty darn clean the way they are.
14:50 genio my $r = $self->routes;  #no auth  $r->any('/foo')->to('controller#method');   # protected routes, requires auth  my $pr = $r->under->to('controller#is_logged_in');  $pr->any('/protected')->to('controller#requires_auth');   #gross simplification, but regular vs authenticated routes are easily separated and plain to see
14:58 mire joined #mojo
15:12 sri he's indeed pretty low on details, i was just assuming he's talking about composability of routes
15:16 sri but yea, the bridge action can be anywhere, so it's easily reused
15:19 sri perhaps even something like helpers as route targets would help with composability :)
15:39 basiliscos joined #mojo
15:48 * sri is not gonna rush anything though... the whole composability thing went very wrong in catalyst
16:52 janus joined #mojo
17:06 sri the more i think about it the more it reminds me of ActionClass in catalyst and how much it sucked ;p
17:19 denis_boyun_ joined #mojo
17:20 jberger doesn't look like I will get to do much Perl this weekend after all
17:20 jberger batman sorry I have not had time to review
17:21 jberger When you are busy all well, the weekend become dedicated to those things at didn't get done during the week
17:56 denis_boyun joined #mojo
18:06 cpan_mojo Mojolicious-Plugin-Module 0.03 by Georgy Bazhukov - http://metacpan.org/release/BUGOV/Mojolicious-Plugin-Module-0.03
18:24 phillipadsmith joined #mojo
18:27 stokachu hmm looks like with mongo 2.4.6 im getting errors about "MongoDB wire protocol version2 required" as well
18:27 stokachu the build tests seem to be failing now too
18:28 sri https://github.com/kraih/mango/blob/master/Changes#L11
18:31 stokachu sri: so these should be fixed?
18:32 stokachu https://travis-ci.org/kraih/mango/jobs/22769543
18:32 cpan_mojo Mojolicious-Plugin-CHI 0.09 by Nils Diewald - http://metacpan.org/release/AKRON/Mojolicious-Plugin-CHI-0.09
18:32 stokachu shows the same error im getting
18:33 sri what part of the sentence i linked to is unclear?
18:33 stokachu the part where the builds are failing..
18:34 sri "MongoDB 2.4 is no longer supported."
18:34 stokachu "your. builds. are. failing"
18:35 sri irrelevant
18:35 purl it has been said that irrelevant is that or big and gray with a trunk or big and pink with a trunk or irreverent
18:35 sri they will pass once travis has mongodb 2.6
18:41 stokachu a lot of the linux distributions aren't shipping 2.6 yet
18:45 sri then don't install the latest version of mango
18:46 stokachu 0.24 the latest without the changes to 2.6?
19:07 balazs joined #mojo
21:13 sri btw. you can already have routes to helpers :)
21:15 sri perl -Mojo -E 'helper foo => sub { shift->render(text => "works!") }; get("/")->to(cb => app->renderer->helpers->{foo}); app->start' get /
21:35 sugar__ joined #mojo
21:37 batman jberger: yeah, i know the feeling :(
21:37 batman i will reassing the issues to me and merge them
21:37 batman i'm pretty confident, so i will take all the blame :)
21:38 batman *bed time*
21:39 sugar joined #mojo
22:14 sri a reason to take a closer look at promises for mojolicious... they get used heavily in perl6 https://gist.github.com/jnthn/11126125
22:17 rem_lex|pivo joined #mojo
22:39 meshl joined #mojo
22:52 sri i was just thinking "i bet nobody actually uses $r->add_shortcut()" and of course there's like 10 modules on cpan that do :o
23:09 mire_ joined #mojo
23:19 sujithm joined #mojo
23:25 d4rkie joined #mojo
23:29 zivester joined #mojo

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