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

IRC log for #mojo, 2015-06-16

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

All times shown according to UTC.

Time Nick Message
00:33 thowe joined #mojo
01:17 xdg joined #mojo
01:24 klapperl joined #mojo
01:36 asarch joined #mojo
02:23 noganex_ joined #mojo
02:25 thowe In a template, how do I make it not encode html?  So that <%= $some_html_text %>  will include the raw text.
02:28 thowe Ah, Oh, I see.  NM, ==
02:47 damaya_ Is it possible, without a callback, to have a route like /user/:type that goes to one controller/action and another route like /user/subscribe that goes to a different controller/action?
02:54 Grinnz sure, just define /user/subscribe first
02:55 Grinnz routes match in order
02:55 hshong joined #mojo
02:59 damaya_ ok, thank you Grinnz :)
03:38 woz joined #mojo
04:06 kaare joined #mojo
04:14 damaya_ joined #mojo
04:40 woz joined #mojo
05:52 damaya_ joined #mojo
05:59 kaare_ joined #mojo
06:20 Lee joined #mojo
06:20 dod joined #mojo
06:21 marcus o/
06:26 dod joined #mojo
06:29 stephan48 jberger: good idea!
06:44 damaya_ Hey all, morbo used to log to terminal, it now logs to development.log by default (so it seems). I really liked when it logged to terminal. Any way to get that behavior back?
06:51 trone joined #mojo
06:54 cpan_mojo Mojo-SinaWeibo-1.2 by SJDY https://metacpan.org/release/SJDY/Mojo-SinaWeibo-1.2
06:55 kaare_ joined #mojo
06:57 kaare__ joined #mojo
07:01 eseyman joined #mojo
07:09 AndrewIsh joined #mojo
07:25 gatitskiy joined #mojo
07:27 tempire damaya_: remove your log directory, and it will log to terminal
07:27 Snelius it's too simple man
07:28 Snelius )
07:31 Vandal joined #mojo
07:46 gatitskiy joined #mojo
07:48 gatitski_ joined #mojo
07:50 gatitskiy joined #mojo
07:50 woz joined #mojo
07:52 gatitski_ joined #mojo
07:54 gatitskiy joined #mojo
07:56 cpan_mojo Mojo-SinaWeibo-1.3 by SJDY https://metacpan.org/release/SJDY/Mojo-SinaWeibo-1.3
08:20 mattastrophe joined #mojo
08:32 gatitski_ joined #mojo
08:34 bin_005 joined #mojo
08:34 gatitskiy joined #mojo
08:34 woz joined #mojo
08:36 gatitski_ joined #mojo
08:39 gatitskiy joined #mojo
08:41 gatitski_ joined #mojo
08:46 gatitskiy joined #mojo
09:04 gatitski_ joined #mojo
09:07 gatitskiy joined #mojo
09:09 gatitski_ joined #mojo
09:11 damaya_ How do I test Mojo::JSON::_Bool value for truth?
09:11 damaya_ true/false
09:11 purl true/false is the same file, it should be lned.
09:12 gatitskiy joined #mojo
09:14 damaya_ Basically, how do I extract the value
09:16 Snelius Mojo::JSON->true ?
09:17 damaya_ Hrm, it
09:17 damaya_ It's a response from post, for Google recaptcha
09:18 damaya_ $ua->post('google-recaptcha-url', form => { formdata })->res->json->{success} gives me the response from success, i.e., true or false
09:18 damaya_ which, looks like this: 'success' => bless( do{\(my $o = 1)}, 'Mojo::JSON::_Bool' )
09:19 damaya_ I know it's true (the my $o = 1), but not sure how to test for true/false in my code.
09:19 bpmedley damaya_: my $success = $ua->post('google-recaptcha-url', form => { formdata })->res->json->{success};  if ($success) { … }  <— Can you do that?
09:19 odc batman, ping!
09:19 batman damaya_: $t->json_is('/success', 1);
09:20 batman oh. right. not a *unit test*...
09:22 odc batman, how did you manage to make mojopaste work behind a proxy with a custom path (like ssl.thorsen.pm/paste/)? When I do that, the 'Paste' button redirects me to '/' instead of '/paste'
09:23 damaya_ thanks batman, I tested that just now setting it to false, and it worked.
09:24 gatitski_ joined #mojo
09:24 punter joined #mojo
09:31 ToApolytoXaos joined #mojo
09:38 batman odc: no. not without Toadfarm.
09:38 odc ahh toadfarm of course
09:38 batman odc: i need 1) the code from Mojolicious::Plugin::RequestBase 2) use that plugin for that to "just work"
09:39 batman odc: i'm not adding it, but i will take a PR :)
09:39 odc good to know! i'll look into it
09:39 batman damaya_: you can also to $t->json_is('/success', 1); if ($t->success) { die "?????" } :)
09:40 batman odc: thanks
09:40 gatitskiy joined #mojo
09:44 dvinciguerra joined #mojo
09:45 mattastrophe joined #mojo
09:46 odc now that i think about it, wouldn't this be a feature to add to hypnotoad? in complement to the 'proxy' option
09:46 batman odc: https://groups.google.com/forum/?utm_source=digest&amp;utm_medium=email#!topic/mojolicious/hZu18SdEmbc :)
09:47 batman odc: i'm leaning against a +1, but i'm not sure if i understand it fully
09:47 odc yeah that's what i thought :)
09:48 batman odc++
09:49 odc batman, i see 2 ways of doing this: 1) the 'proxy' option now looks at the 'X-Request-Base' header and marcus plugin becomes useless, or 2) we add a new hypnotoad option called 'base_path' which contains the path to add (like '/paste')
09:50 batman i really don't like base_path, but also adding a before_dispatch "delay" for all apps is not very good either
09:51 batman delay = cpu cycles, running through that code, which is often no-op
09:51 batman also, remember that this doesn't have anything to do with hypnotoad. it has to work for all Mojo::Server::Daemon daemons
09:51 batman ::Prefork, ::Hypnotoad, ::Daemom, ...
09:52 gatitski_ joined #mojo
09:53 odc hm true
09:54 gatitskiy joined #mojo
09:59 mattastrophe joined #mojo
10:00 odc that should be added to Mojo::Message::Request
10:00 marcusr daemom
10:01 odc marcus, i mean the parsing of x-request-base
10:02 marcusr no, I was teasing batman, odc.
10:02 odc ho lol!
10:03 gatitskiy joined #mojo
10:07 batman marcusr: you no like dae-mom? :)
10:07 batman odc: probably ::Transaction
10:07 marcusr batman: I'm not sure your mum would appreciate you calling her that.
10:08 batman odc: nevermind that last
10:09 sri odc: there is no standard for that, so it's not going into core
10:11 batman sri: is X-Forwarded-Proto a standard, while X-Request-Base is not? (just curious)
10:11 odc sri, let's create a new standard!
10:12 odc hm that's ok, adding a new config option would be cleaner than
10:12 sri let me know once your RFC is published
10:17 mattastrophe joined #mojo
10:30 gatitski_ joined #mojo
10:32 mattastrophe joined #mojo
10:33 gatitskiy joined #mojo
10:35 gatitski_ joined #mojo
10:40 gatitskiy joined #mojo
10:48 cpan_mojo Mojo-SinaWeibo-1.4 by SJDY https://metacpan.org/release/SJDY/Mojo-SinaWeibo-1.4
10:48 sri the wishlist thread is a little underwhelming so far
10:50 mattastrophe joined #mojo
10:58 odc posted!
10:58 bin_005 joined #mojo
10:59 sri would have been nice if you had mentioned my argument as well
11:00 odc oops! sorry
11:00 sri think i'll ignore the post and not answer again
11:00 odc wait? what's the problem? i'm suggesting NOT using x-request-base
11:02 gatitski_ joined #mojo
11:21 sri oh great, someone else answered... now i have to answer
11:21 gatitskiy joined #mojo
11:29 sri odc: should have worked on a standard, now the proposal is getting killed
11:30 gatitskiy joined #mojo
11:32 Caldrin joined #mojo
11:32 Caldrin Hi!
11:34 Caldrin I want to grow my Mojolicious::Lite based app and look for help. Here is my problem description:
11:36 Caldrin I currently have multiple Mojolicous::Lite based modules that handle some functions of a REST API. The API daemon calls a module that reads a config and for every config entry does this: $r->any($target->{url})->detour($target->{module}) This obviously has two main issues:
11:37 Caldrin 1.) every module needs to be responsible for a sub-part of the API, i.e. User.pm needs to handle /api/users/new and /api/users/del I can not have /api/users/list in a different module (at least I don't know how)
11:38 Caldrin 2.) The config needs to contain every module and what it is responsible for.
11:39 Caldrin So my idea is now to have modules autodiscovered with something like Module::Pluggable and have each module contain some sort of init() function that defines the routes this module is responsible for.
11:39 Caldrin Here are my questions:
11:39 Caldrin Is there any autodiscovery mechanism built into Mojolicious already?
11:41 gatitskiy joined #mojo
11:42 Caldrin Can I mix Mojolicous modules and Mojolicous::Lite module somehow? I found this: my $r = $self->routes;  $r->any('/')->to('login#index')->name('index'); but it looks like Mojolicious::Lite builds its own routes
11:42 mst auto-discovery has its disadvantages
11:42 Caldrin And finally (maybe I should have started with this): is there any better way to achieve what I am trying to achieve?
11:42 mst we did it in Catalyst
11:43 mst but it's notable that sri didn't re-create it in Mojo and I didn't in Web::Simple
11:43 mst I'd consider instead having something the base url + module name kept as a hashref/arrayref in the main app class
11:44 mst adding one line to there when you add a new module is not actually that terrible
11:44 mst (and you can always switch it to Module::Pluggable later if it really annoys you)
11:44 sri i did recreate it for lulz http://blog.kraih.com/post/43198653667/mojolicious-hack-of-the-day-mojolyst
11:44 Caldrin Good point
11:44 purl nice and sharp
11:45 gatitski_ joined #mojo
11:48 gatitskiy joined #mojo
11:49 marmez joined #mojo
11:50 marmez left #mojo
11:51 sri oh
11:52 sri 999 people on the mailing list :)
11:52 gatitski_ joined #mojo
11:53 sri (...and bots...not discriminating!)
11:55 mattastrophe joined #mojo
11:56 mst 999 bugs in the code / 999 bugs / fix one down / deploy it around / 1027 bugs in the code
12:00 neilhwatson joined #mojo
12:01 ans1 joined #mojo
12:19 jberger mst++
12:19 mattastrophe joined #mojo
12:21 gatitskiy joined #mojo
12:24 gatitskiy joined #mojo
12:26 gatitski_ joined #mojo
12:30 gatitskiy joined #mojo
12:32 lb my week
12:38 doby_ joined #mojo
12:46 mattastrophe joined #mojo
12:49 sri and 1000!
12:49 purl I don't like big numbers like that.
13:01 * sri pats purl
13:01 purl how condescending
13:02 jberger Hehe
13:02 jberger Botsnack
13:02 purl :)
13:06 mattastrophe1 joined #mojo
13:15 jberger hmmm I'm curious how to respond to https://github.com/kraih/mojo/issues/811
13:16 jberger I was going to disagree on premise, but it turns out he is right, image is treated as an alias for img
13:16 jberger and so the selector is then confusing
13:17 pink_mist does the css spec have anything to say on this issue?
13:17 xiv joined #mojo
13:20 ashimema joined #mojo
13:26 jberger the HTML5 spec seems to require the mapping to img (I'm not surprised, sri usually gets that kind of thing correct)
13:28 Kogurr joined #mojo
13:30 ajr_ joined #mojo
13:32 mattastrophe joined #mojo
13:32 pink_mist well yes, I assumed that mapping image to img in html was kosher ... but mapping image to img in css selectors is something that would haveto be in the css spec before I thought it'd be a good idea
13:33 jberger I think I would lean in that direction too
13:33 jberger if the image tag is so out of favor that it is supposed to be replaced by parsers, that pretty much obviates it IMO
13:37 jberger I have found several references to image -> img being in the HTML5 spec, but I can't actually find it in the spec
13:37 jberger and I'm going to have to stop looking soon as I have to get ready for work
13:57 genio I replied with my $0.02 but meh
13:58 jberger genio++
13:58 jberger browser behavior is something that we do take into account
14:02 pink_mist A start tag whose tag name is "image"
14:02 pink_mist Parse error. Change the token's tag name to "img" and reprocess it. (Don't ask.)
14:02 pink_mist heh
14:02 asarch joined #mojo
14:02 pink_mist from http://www.w3.org/TR/html5/syntax.html
14:06 zivester joined #mojo
14:06 Grinnz_ hahaha
14:06 jberger pink_mist++
14:06 jberger that's awesome
14:17 Caldrin left #mojo
14:23 * sri doesn't actually understand the whole auto-loading thing in the wishlist thread
14:24 sri how could we ever auto load plugins?
14:30 jberger a cpan plugin for that would be easy enough, a wrapper around Module::Pluggable
14:31 jberger but I can tell you I certainly wouldn't want auto loading of all available plugins
14:31 jberger cf Mojolicious::Plugin::Kavorka that I just released
14:32 sri it makes no sense
14:33 mst sri: easy, just load every module in @INC and then walk %Mojolicious::Plugin::
14:33 jberger mst++
14:33 sri i was more referring to the need for plugins to be configured
14:33 jberger well there is that too
14:33 sri aside from the fact that many will be conflicting or do weird shit
14:34 sri "oh yea... i installed some werewolf plugin for lulz a few months ago... now our site is down during full moon"
14:35 jberger sri: https://metacpan.org/pod/Mojolicious::Plugin::ZombieApocalypse
14:35 Grinnz_ s/is down/attacks and eats other sites/
14:36 jberger although I think his mechanism could be better, that just mimics a segfault, Acme::Boom can cause one!
14:40 jberger Acme::Boom's test is actually quite interesting: https://metacpan.org/source/DGL/Acme-Boom-3735928560/t/01.boom.t
14:41 bwf joined #mojo
14:44 jberger definition of happiness: +0 −22,745
14:51 lluad joined #mojo
15:00 dvinciguerra joined #mojo
15:00 sri hmm
15:00 sri do we want this? https://gist.github.com/anonymous/31a50119319a19efb0af
15:04 aggrolite joined #mojo
15:05 pink_mist 99s/rigth/right/
15:05 sri oops
15:06 pink_mist (I have no idea if it's wanted or not)
15:07 zackiv31 joined #mojo
15:07 sri it's from the wishlist
15:07 sri basically allow commands that have no actual module file
15:08 sri i know Akron wanted that a long time ago
15:08 sri not quite like this... but similar
15:08 sri think commands without module file actually work right now, but just don't show up in the command list
15:09 Grinnz_ seems reasonable to me
15:09 sri this makes them detectable, so they do appear in the list
15:10 mst or you could add a register_command method somewhere
15:10 mst and let users register non-normal commands that way
15:10 mst might be more flexible
15:10 sri too late for that i believe
15:11 sri we would have to have two command systems then
15:12 sri don't think we depend on module files anywhere else, so the patch would be more consistent anyway
15:13 sri if we went the register_command route, i think we would have made all commands normal plugins
15:14 sri a valid solution, but too late now
15:16 mst oh, I was thinking you'd do 'foreach (find_modules()) { register_command()) }'
15:16 mst so it was still one system
15:16 sri jberger, marcusr, batman, crab, tempire: thoughts on the patch?
15:18 sri argh... wikipedia keeps changing urls and our live tests keep breaking
15:18 batman +1
15:18 purl 1
15:18 mst sri: so, not sure why that would require two systems
15:21 * jberger looks
15:22 batman sri: i like it. useful for lite apps.
15:23 jberger batman: indeed
15:23 good_news_everyon joined #mojo
15:23 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vL31O
15:23 good_news_everyon mojo/master 9d69906 Sebastian Riedel: add support for commands without module files
15:23 good_news_everyon left #mojo
15:26 jberger I don't think there is much risk, it still checks that the module isa Mojolicious::Command
15:26 jberger so there shouldn't be accidental incorrect loading
15:27 sri yes, it seems pretty safe
15:27 jberger commands in lite apps sounds kinda fun
15:28 sri i imagine it can be useful for examples
15:31 sri holy shit
15:31 purl Sterca sancta, fili mi.
15:31 sri we've had no release in a month now
15:31 jberger botsnack
15:31 purl thanks jberger :)
15:31 jberger sri: wow
15:31 sri that has not happened since the project started i believe
15:32 jberger actually, that brings up an idea I had at YAPC::NA
15:32 jberger let me just float this
15:33 jberger what if we changed the deprecation policy to only remove at major version numbers, and possibly do those more often (say 6 months ish?)
15:33 jberger I think as we are slowing down in releases it starts to make more sense to make the version number more semantic than the timing
15:33 jberger just an idea
15:34 sri i want to say yes... but then i remember the shitty code i want to get rid of quickly :)
15:34 jberger sure, then we bump major version
15:34 batman I agree on the last point (semantic), but I don't agree on every six month
15:34 jberger we don't promise dates even now
15:35 jberger batman: currently we can remove features every 3 months and we can do so with only a note in the Changes
15:35 batman The idea doesn't scream stability imho :(
15:35 jberger (and warnings of course, but that requires doing the 2 month updates)
15:36 sri definitive -1 from me btw.
15:36 jberger batman: have we ever screamed stability?
15:36 sri if semantic versioning, then real semantic versioning
15:37 jberger sri: I don't understand
15:37 batman jberger: not really, but I don't want to make it worse. I like it how it is now.
15:37 sri jberger: you want to half-ass semantic versioning
15:37 sri "more semantic"
15:37 Grinnz_ i'd say -1, it feels less flexible and less beneficial
15:38 sri i'm not opposed to semver, but i'd want real semver
15:38 batman I didn't like the 6.0 from a work-environment perspective.
15:39 batman But I did like it as a mojo-dev perspective ;)
15:39 jberger sri: I'm not proposing any specific versioning scheme I don't think, I could be swayed to full semver
15:39 sri reality is, with real semver we'll just make more major releases that break stuff
15:39 sri so it's not really less flexible
15:40 batman sri: I agree
15:40 Grinnz_ i mean the schedule proposed would be, i dont know about real semver
15:40 sri i think many people who ask for semver don't realize that :)
15:40 sri yea, semver doesn't have a schedule
15:40 sri we'll never have a schedule
15:40 batman Low on batt. *bbl*
15:41 Grinnz_ i think the deprecation policy following strict time periods is important for real-world usage
15:41 sri Grinnz_: not if you respect the semver rules
15:42 mst I think having a -minimum- time is important still, but a specific schedule isn't
15:42 jberger Grinnz_: while I agree, I also think that it is hard on people to know to upgrade every 2 months
15:42 jberger mst: yeah, that's kinda what I mean
15:42 Grinnz_ i'm not sure i fully understand semver, but people have more control over the time period for their upgrade than the version they get from CPAN
15:42 sri http://semver.org/
15:43 Grinnz_ it's just versioning right, it would not give any indication to time periods as you said
15:43 sri my biggest problem with semver is actually aesthetically... since it looks so shitty in perl
15:43 Grinnz_ heh
15:44 Grinnz_ version.pm madness has been interesting lately as well..
15:44 sri and then there's the marketing problem, frequent major releases make for underwhelming announcements
15:45 jberger the whole thing may be a bit moot now with the upgrading wiki doc
15:45 jberger it was just something I was thinking about is all
15:45 sri hey, no weaseling out of this! ;p
15:45 jberger hahaha
15:46 jberger generally I'm for the idea, I'm not weaseling out
15:46 sri http://www.quickmeme.com/img/5e/5e583df3a3dc71f96d529ee769a3363bda6b7613b2aa72d9963be0be2f897284.jpg
15:46 jberger I think people see a major version number and (at least should) see that as an indication that things might break
15:46 jberger hahaha
15:47 jberger do I wish that everyone used Carton or the like, yes, but they don't
15:47 mst Grinnz_: version.pm madness is always 'interesting'
15:48 Grinnz_ jberger: which is why i prefer that that sudden breakage only happens once a year atm :P
15:49 Grinnz_ (barring security issues...)
15:49 * sri bans security issues
15:49 Grinnz_ haha
15:52 jberger Grinnz_: but that isn't currently the case
15:53 jberger sudden breakage can currently happen every 3 months
15:53 jberger IF you aren't reading the Changes document or upgrading often enough
15:53 Grinnz_ that's not sudden, it's deprecated, which is something you should be aware of if using Mojolicious in that situation
15:54 jberger Grinnz_: anyway, the second part of your statement isn't correct either
15:54 Grinnz_ which statement?
15:54 jberger we don't have any stated schedule for major versions
15:54 Grinnz_ no, but i'm speaking realistically
15:54 jberger once a year has been more or less coincidental
15:55 Grinnz_ whether we went with sorta-6mo, or full semver, major releases would happen more often
15:57 sri i don't see semver + schedule happening
15:58 sri if there was real demand, certainly someone would have forked a LTS version of mojolicious by now ;p
16:00 * sri actually offered to do it a few times before... in exchange for a barrel of money
16:00 Grinnz_ hehe
16:02 * jberger prepares a barrel of drachma
16:03 * sri should have been more specific... d'oh!
16:04 * mst prepares a barrel of eurocents
16:05 * Grinnz_ tries to find a barrel for bottle caps
16:06 ribasushi at this point the only way I can top this is by preparing *the* barrel: http://www.amazon.com/Payment/dp/B005MR3IVO
16:06 sri there's so little complaints about Mojo::DOM anymore... i uess the 6.0 changes really worked out
16:07 jberger ribasushi: :o
16:07 sri ribasushi: Oo
16:07 jberger sri: yeah, I think that was a great thing
16:07 jberger "Note: Includes pump."
16:09 ribasushi jberger: I will be quoting you on your last 2 lines
16:09 Grinnz_ lol
16:09 jberger hahahaha
16:09 purl LOLCON 4 reached.
16:09 Grinnz_ yeah the 6.0 DOM changes were great
16:11 sh4 joined #mojo
16:19 lagrasta joined #mojo
16:19 lagrasta left #mojo
16:29 jberger hmmmm, I don't want to change my LastPass master password
16:29 jberger mine was awesome
16:43 aggrolite i know :-( so sad
16:44 jberger aggrolite: I'm kinda swamped with other things btw, would you like comaint on MPnopaste?
16:45 aggrolite jberger, i don’t understand the last bit of your comment
16:46 jberger Mojolicious::Command::nopaste, sorry, P should have been C
16:46 aggrolite jberger, oh sure. if you trust me :-o
16:46 dvinciguerra joined #mojo
16:47 jberger enough to let you tinker with a non-critical command like nopaste
16:47 aggrolite yay >:)
16:49 aggrolite jberger, thanks!
16:49 aggrolite btw…i mixed up the mathbin sites on this issue. need to update it https://github.com/jberger/Mojolicious-Command-nopaste/issues/4
16:50 aggrolite apparently there is mathb.in (which is the current service) and mathbin.net
16:50 jberger ah
16:50 jberger well don't remove the good one, but I like the look of texpaste if you want to try you hand at another service
16:51 jberger looks like that one has a CSRF protection field, so it might require a prefetch
16:52 aggrolite i will take a look then
16:53 jberger aggrolite: you don't have to implement it if you don't want to
16:54 jberger if not, maybe just open an issue so that I can try to remember (like I did with fpaste)
16:54 aggrolite jberger, np i’ve updated the issue I originaly made for mathbin https://github.com/jberger/Mojolicious-Command-nopaste/issues/4
16:55 aggrolite i will at least take a look to see what’s involved before doing much work
16:58 jberger note also that if you add a service, you should be sure that the module perms are setup correctly (or I wouldn't be able to release anymore)
17:01 aggrolite got it
17:05 thowe joined #mojo
17:25 amon joined #mojo
17:28 absolut_todd joined #mojo
17:30 damaya joined #mojo
17:32 PryMar56 joined #mojo
17:35 berov joined #mojo
17:37 dod joined #mojo
17:37 ajr_ joined #mojo
17:45 ajr_ joined #mojo
18:12 Britzel|2 joined #mojo
18:17 cpan_mojo Mojolicious-Command-snoodoc-0.04 by CURTIS https://metacpan.org/release/CURTIS/Mojolicious-Command-snoodoc-0.04
19:02 sh4 joined #mojo
19:18 tempire +1 on  Mojo::Loader patch
19:19 tempire Autoloading plugins is a bad idea, I think.
19:19 tempire But the ability to specify them in a config file...
19:19 * tempire considers
19:20 bin_005 joined #mojo
19:26 jberger tempire: any such loader could as easily be a plugin on CPAN, the only thing that it would be necessary to have core do would be to do it automagically, which I think we all agree is a Bad Idea (TM)
19:26 Grinnz_ i think (hope) that's what was being asked for, autoloading them wouldn't end well
19:27 sri the wishlist posts were very ambiguous
19:28 sri my assumption was that they wanted a config section for plugins
19:28 sri which is something i want to see on cpan first
19:28 sri and if it becomes an auto include in most new apps, we can core it
19:32 batman i'm not sure if i want this to be a generic config thing. writing the code is probably one line of code, so i don't see the big deal
19:34 oalders i've got a DBIC object in my stash and, under development,  i wanted to clear it from the stash before an exception page is rendered
19:34 oalders i tried this in before_render but that seems to be too later
19:34 oalders *late
19:34 tyldis joined #mojo
19:35 sri there's a stash snapshot, also stored in the stash
19:36 sri called "snapshot"
19:36 oalders ah, thanks
19:36 sri that's the one exception/not_found templates actually show
19:37 oalders ok, i see it. perfect :)
19:37 Grinnz_ batman: i guess its a question of whether someone finds it more convenient to have boilerplate in config or in the startup... the option does sound appealing
19:38 batman i agree. not a big fan of configs anymore, so i guess i can't really vote on the issue :)
19:38 Grinnz_ but then, most of the time you need a plugin to read the config to begin with :s
19:38 sri i'm also not a fan of pushing what shoudl be app code into config files
19:39 Grinnz_ yeah... depends on the plugin, some of them are more "implementation"
19:39 sri but i assume they want it for deployment specific plugins or so
19:39 Grinnz_ perhaps
19:39 sri anyway, as Grinnz said, you need a config plugin anyway
19:40 sri so loading a second PluginLoader plugin shouldn't be a big deal
19:40 * sri would rather have Mojo::Pg in core than stuff like that ;p
19:41 sri at least then we can put a FULL STACK sticker on the frontpage
19:42 Grinnz_ hahaha
19:43 Grinnz_ well, just write a Pg driver that doesn't use DBI and you're golden!
19:43 pink_mist don't give him ideas :P
19:43 Grinnz_ we already have one for mysql :P
19:44 sri haha
19:45 sri i guess if i'm in the mood for protocol hacking it will have to be http/2 :S
19:45 Grinnz_ i wonder if anyone has put that MySQL5 module through some heavy usage
20:03 melo joined #mojo
20:03 aggrolite joined #mojo
20:06 trone joined #mojo
20:15 woz joined #mojo
20:16 zackiv31 joined #mojo
20:42 PryMar56 joined #mojo
20:46 batman "deployment specific plugins" -- that's why i wrote toadfarm :)
20:58 disputin joined #mojo
21:01 disputin1 joined #mojo
21:08 bin_005 joined #mojo
21:20 _dave_ I just make my app load plugins and models from a config file...I'm getting addicted to Mojo getting out of the way of both my genius and my stupidity
21:22 jberger _dave_++
21:27 Onigiri Oh so the team that swiped the UI dev of the project I was on... swiped me.
21:28 Onigiri So now I'm on their team. lol
21:28 dvinciguerra joined #mojo
21:28 jberger Onigiri: ?
21:29 Onigiri jberger: I'm on a workforce team. I'm writing a schedule software.
21:29 Onigiri Basically the UI wasn't getting "done fast enough" for soembodys likeing, so they gave the UI to the c# team.
21:30 Onigiri Now since they want "better access to knowledge" or some shit, I'm now on that team.
21:30 Onigiri But I'm still doing the backend in perl.
21:30 Onigiri It's... odd
21:30 jberger UI in C# and backend in perl (mojo?) sounds interesting
21:31 Onigiri mojo, yeah.
21:31 _dave_ aren't managers fun? :)
21:31 ajr_ If you feed Mojolicious/Controller.pm something that upsets it, like an undef value, is there an easy way to identify the offending variable?
21:31 Onigiri I'm offering up the report data via an api call.... and then some middle where shit is consuming it
21:32 Onigiri _dave_: yep
21:32 jberger Onigiri: I assumed as much, still humorous
21:32 Onigiri I was offering up reports via functions in the db... but they "can't access those easily enough"
21:32 Onigiri ._.
21:32 jberger ajr_: I'm not sure what that means
21:32 Onigiri Basically their entity framework thing is stupid.
21:32 Onigiri So tables only etc
21:32 * jberger knows what that is like :D
21:34 Onigiri Now I'm really digging mojo::pg, and the ability to swipe the underlying dbh, do a bunch of "odd" things to it... then force discard it so the caching pool doesn't reuse it
21:34 good_news_everyon joined #mojo
21:34 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vLZwh
21:34 good_news_everyon mojo/master 7ddfa5c Sebastian Riedel: mention prove in the tutorial
21:34 good_news_everyon left #mojo
21:35 ajr_ If I get an error like this:Can't call method "plugins" on an undefined value at /usr/lib/perl5/site_perl/5.18.1/Mojolicious/Controller.pm line 167." how can I tell where the undef came from?
21:37 jberger ajr_: that's a really odd question, because the thing being called is the app instance
21:37 ajr_ Is that clearer?
21:37 jberger if that has gone away, something else very strange has happened
21:38 jberger are you making an instance of Mojolicious::Controller manually?
21:38 ajr_ Not that I'm aware of.
21:39 Grinnz_ try Carp::Always
21:39 _dave_ maybe you called render from a non controller?
21:44 ajr_ Possibly. I'm not so concerned with the particular error as I am with ensuring that I'm not overlooking any information available.
21:46 jberger ajr_: it sounds to me like you are using the controller class incorrectly
21:46 jberger used correctly, the app attribute should always be available
21:55 good_news_everyon joined #mojo
21:55 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vLZ1j
21:55 good_news_everyon mojo/master 7abe608 Sebastian Riedel: more Mojo::Loader tests
21:55 good_news_everyon left #mojo
22:59 thowe joined #mojo
23:00 thowe how do I access a helper from a template in a Lite app?
23:00 thowe a herlper I defined
23:00 thowe er helper I defined
23:00 Grinnz_ templates are the same in Lite and full
23:00 thowe http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Helpers  <- this is confusing me, and not working.  I must not understand something
23:02 Grinnz_ how are you defining the helper? how are you calling it?
23:02 thowe er, well, it helps to type the right syntax....
23:02 Grinnz_ heh
23:02 thowe I typoed
23:02 thowe So, $c is available by default (?)
23:03 Grinnz_ helpers are autoloaded off the current controller, i believe
23:03 thowe I have jst never used $c in Mojo...  In my head that was a Catalyst thing...
23:04 Grinnz_ $c just means controller object
23:04 thowe But then my Mojo mojo is new and very babyish
23:04 Grinnz_ "At the beginning of the template, stash values that don't have invalid characters in their name get automatically initialized as normal variables, and the controller object as both $self and $c."
23:04 Grinnz_ ^ and that.
23:05 thowe Where's that.  That's something I should read fully....
23:05 Grinnz_ Embedded Perl section of the rendering guide
23:06 thowe sweet
23:06 thowe Were you at YAPC
23:06 Grinnz_ no
23:10 thowe Thank you for your help, BTW.
23:11 thowe That worked for me like a champ
23:33 asarch joined #mojo
23:55 damaya joined #mojo

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