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

IRC log for #mojo, 2015-05-07

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

All times shown according to UTC.

Time Nick Message
00:13 Adurah So, Mojoconf organizers found out about agar.io and now the thing is cancelled?
00:14 Grinnz wtf is this
00:14 Grinnz is this a goddamn katamari MMO
00:15 Grinnz holy crap.
00:15 purl rumour has it holy crap. is lighttpd really as broken as http://search.cpan.org/~yoshida/CatalystX-Plugin-Engine-FastCGI-Lighttpd-0.1.0/lib/CatalystX/Plugin/Engine/FastCGI/Lighttpd.pm indicates
00:15 Adurah It's quite addictive...
00:38 hshong joined #mojo
00:42 Vertig0 joined #mojo
00:48 Repaster joined #mojo
00:57 eduardow joined #mojo
01:03 asarch joined #mojo
01:06 Repaster joined #mojo
01:11 klapperl_ joined #mojo
01:49 damaya joined #mojo
02:06 Grinnz batman, i'm wondering now how to make Mojo::IRC be able to connect to e.g. Freenode with SASL auth
02:06 Grinnz have you explored that before?
02:08 Grinnz it apparently is a "client capabilities" extension
02:08 Grinnz does not look simple :)
02:09 avenj mm
02:09 avenj looked at this in conjunction with other stuff and yeah, it's not simple
02:09 avenj not sure what I remember either :o
02:10 Grinnz it has to request the capability before sending nick/user, and then authenticate when the server acks it
02:11 Grinnz which is a multiple step process in itself
02:12 Grinnz i guess for now i'll settle for "make the bot keep trying to join a channel until nickserv gets around to authing"
02:15 noganex joined #mojo
02:15 diegok joined #mojo
02:16 al joined #mojo
03:22 zivester joined #mojo
03:24 jberger https://twitter.com/cpan_new/status/596153465941856256
03:35 jberger http://photos-c.ak.instagram.com/hphotos-ak-prn/1171928_577244245722530_1037083258_n.jpg
03:35 jberger sorry, happened to find that in an unrelated search
03:36 cpan_mojo Mojolicious-Plugin-RevealJS-0.01 by JBERGER https://metacpan.org/release/JBERGER/Mojolicious-Plugin-RevealJS-0.01
03:41 jberger woo and used to deploy the talk to heroku too!
03:42 jberger http://mojolicious-introduction.herokuapp.com/#/
03:42 jberger and exported as static to github
03:42 jberger http://jberger.github.io/MojoliciousIntroduction/#/
03:43 jberger guess its time to start writing the YAPC talk
03:46 basic6 joined #mojo
03:56 buu Dear diary, today I learned via systems breaking that the Mojo::DOM api changed.
04:01 Dandre joined #mojo
04:08 jberger buu: https://github.com/kraih/mojo/wiki/Upgrading
04:09 buu oh
04:09 buu hey
04:10 buu There's a major version bump involved.
04:10 jberger yessir
04:10 jberger (assuming sir)
04:10 jberger (a gender non-specific sir is needed, hmmm)
04:10 buu preceding_siblings => preceding_nodes
04:10 buu Heh, I was still using 'previous_siblings'
04:10 buu oh
04:11 buu there's preceding and previous at the same time
04:11 jberger disambiguating the node methods vs the element methods was an important and much needed change
04:12 buu Is the idea that preceding_nodes is more distinct than previous_node(s) ?
04:12 jberger tbh I rarely use the node api
04:12 jberger I'm sure someone else here has more experience with it
04:12 buu Well, yeah
04:12 buu Obscure websites and terrible layout.
04:13 jberger ?
04:13 buu (why I need to get nodes)
04:13 jberger oh, that's the last resort for parsing
04:13 jberger yeah
04:13 jberger that and cleaning I think are the common uses
04:13 jberger Grinzz++ Upgrading document
04:13 buu They have this table of items laid out like .. " 2 " \n <a>stuff</a>\n <br>\n
04:14 buu And I need "2 stuff"
04:14 jberger I did scrape a site that demarked reply messages with <!-- reply #xxxxx -->
04:14 buu ha
04:14 jberger but that was a long time ago
04:14 buu Cute
04:15 jberger I just did a regexp split IIRC
04:15 buu The web might be considerably nicer if <br> was deleted
04:15 jberger hehe, I found <p /> in some of our older pages at $work
04:16 buu !
04:16 buu Oh god I had completely forgotten that was a thing
04:16 jberger I didn't know it was a thing
04:16 jberger but semantically I figured it out
04:16 buu I seem to recall people using it to get 'double spaced' paragraphs
04:17 jberger (why the ^$#@ would you need a self-closing paragraph ... oh)
04:17 buu Or just general fuckery.
04:26 Grinnz rofl
04:28 kaare joined #mojo
04:33 jb360 joined #mojo
04:54 polettix joined #mojo
04:58 berov joined #mojo
05:21 bc547 joined #mojo
05:49 melo joined #mojo
06:01 dod joined #mojo
06:06 dod joined #mojo
06:08 bramirez joined #mojo
06:08 melo joined #mojo
06:14 melo1 joined #mojo
06:18 batman Grinnz: i have no idea if Mojo::IRC can support SASL. i don't know anything about it. sorry :(
06:20 marcus batman/Grinnz: What would be the advantage over just using ssl?
06:21 melo joined #mojo
06:22 batman marcus: what does SASL have to do with SSL? i thought SSL was an encryption method, while SASL was an authentication protocol...?
06:23 batman (i really have no idea what i'm talking about)
06:24 marcus batman: Simple Authentication and Security Layer
06:25 marcus batman: not sure why you would need to authenticate with freenode beyond nickserv tho
06:26 * batman out
06:26 marcus batman: btw, I want to move the slow reconnect code from convos into Mojo::IRC
06:26 batman okidoki. make a pr :)
06:26 marcus two, I guess
06:27 marcus o/
06:27 batman jberger: zoffix was using bootstrap3 in a way i didn't know was possible :)
06:28 batman i either need to document that or figure out how to make his way work...
06:41 melo1 joined #mojo
06:47 absolut_todd joined #mojo
06:53 stephan48 marcus: SASL is used on IRC as a method to allow you to authenticate with services(nickserv on freenode) on a early stage, before you are really connected to the network and thus it is eliminating some race conditions like join before auth
06:54 amon joined #mojo
06:55 batman marcus: it's _not_ for default listen
06:55 batman read the code. not just the patch.
06:56 batman marcus: please delete the comment. it's confusing.
06:57 marcus batman: he suggested changing the default listen location
06:57 batman it's not realted to the change.
06:57 marcus your comment seems more confused
06:58 batman then help me improve it.
06:58 batman yours is not confusing. it's simply wrong.
06:58 batman same goes for heathtechnical
06:59 marcus wtf?
06:59 melo joined #mojo
06:59 marcus batman: "Might it not be better to change the default listen location to http://127.0.0.1:3000 rather than faking the host like this?"
06:59 marcus he's not talking about the code as it stands, he's saying to might be better to change the default listen location
06:59 marcus I'm responding to that
06:59 marcus you're just noise afaict.
07:00 batman *deleted*
07:01 batman it's stupid to comment to stuff that's not related.
07:01 batman the comment isn't even related to the pull request
07:01 batman *on
07:02 batman so... this is how it goes: he's removing some code that makes the PR less useful, and then goes on suggesting something that's unrelated.
07:02 marcus batman: ¯\_(ツ)_/¯
07:03 batman the thread went completely sideways.
07:03 * batman stops caring.
07:03 marcus batman: you need to lighten up a bit. or take a break maybe.
07:07 trone joined #mojo
07:10 melo joined #mojo
07:14 eseyman joined #mojo
07:16 good_news_everyon joined #mojo
07:16 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vJA59
07:16 good_news_everyon mojo/master 162016b Sebastian Riedel: check the listen location
07:16 good_news_everyon left #mojo
07:25 good_news_everyon joined #mojo
07:25 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vJAFQ
07:25 good_news_everyon mojo/master ef4fcea Sebastian Riedel: just use a regex
07:25 good_news_everyon left #mojo
07:37 Vandal31341 joined #mojo
08:02 Lee joined #mojo
08:06 bramirez joined #mojo
08:18 McA2 joined #mojo
08:20 dotan1 joined #mojo
08:21 ladnaV joined #mojo
08:23 misty_g3ar joined #mojo
08:24 ashimema joined #mojo
08:26 fhelmber_ joined #mojo
08:36 bramirez joined #mojo
08:49 dod joined #mojo
08:57 mattastrophe joined #mojo
09:10 dp_ joined #mojo
09:12 jojo Is there a way to log incoming request when running Mojolicious::Lite with prefork mode ?
09:19 jojo log on disk I mean
09:19 marcus jojo: You mean like an access log?
09:20 marcus http://search.cpan.org/~graf/Mojolicious-Plugin-AccessLog-0.001/lib/Mojolicious/Plugin/AccessLog.pm
09:20 marcus (might work, note the 0.001 :)
09:20 polettix joined #mojo
09:22 jojo hehe ok
09:35 dod joined #mojo
09:48 Zoffix joined #mojo
10:16 Renaud joined #mojo
10:17 Renaud hi all
10:18 misty_g3ar joined #mojo
10:18 Renaud why mojolicious ask to change passphrase even after efective change please ?
10:21 Newbie__ joined #mojo
10:26 Zoffix Renaud, some plugin is doing something before the change happens
10:26 Zoffix Change it right at the start of the app
10:26 purl Zoffix: that doesn't look right
10:26 Zoffix purl, fuck off
10:26 purl the fuck is now OFF
10:29 Renaud zof : the change is made at the top
10:30 Renaud just after my sefl = shift :)
10:30 Renaud maybe not the right place ?
10:32 Zoffix Renaud, is that inside sub startup?
10:33 Renaud yes
10:33 Zoffix *shrug*
10:33 Renaud ??
10:33 Zoffix And you're doing it as ->secret(['whatever']) right?
10:33 Zoffix I've no idea why it's not working then. Show code.
10:34 Renaud $self->app->secret ...
10:34 Zoffix Maybe you added it but didn't restart the app (if it's not running with morbo, etc)?
10:34 Renaud yes under morbo
10:35 Renaud even afert a restart
10:35 Renaud of morbo
10:35 Renaud bah its just  a warn its not really a pb :)
10:35 Zoffix batman, (re bootstrap) you mean theme => {xyz => "http://example.com/_variables.scss"} actually means a URL and I've used the undocumented way of using a file in /public/ ?
10:36 Zoffix Renaud, um, well, it's telling you your cookies are crackable essentially, so maybe it is a pb :)
10:36 batman Zoffix: well.. the documentation doesn't state that you _can't_ do that, hehe
10:36 Zoffix Ah :) Then I think I've skipped that part :P
10:37 Zoffix Oh, wait, misread.
10:37 batman Zoffix: but it will download and cache the "xyz" resource, so that's why you need to delete a bunch of files to make custom version
10:37 batman Zoffix: the quick solution is to use "custom" instead of "theme".
10:38 Zoffix I'm thinking of going with plain ol' AssetPack anyway though, just to pack bootstrap and my own CSS/JS into single files and save two HTTP requests :P
10:38 batman after you have done "custom": move the CSS/_variables.scss file to sass/xyz/_variables.scss (iirc)
10:38 batman you can do that with Bootstrap3 as well
10:38 Zoffix Oh, good :)
10:39 batman i just fail to get the message across :(
10:39 batman you can't have your scss assets in ./CSS/ though
10:40 batman just one thing first... do you know that scss is just css with sugar on top?
10:40 batman meaning all CSS is also valid SASS?
10:40 batman (the last sentence is not really a question)
10:41 batman Zoffix: that means that this will work better for you: https://metacpan.org/pod/Mojolicious::Plugin::Bootstrap3#Custom-stylesheet
10:42 batman so after the files are copied in, change bootstrap.scss to include _your_ custom files.
10:42 batman but move you custom files to somewhere `sass` will find it, meaning somehere in public/sass/ or a sub directory. not public/CSS/
10:43 * batman waits for questions...
10:43 Zoffix I'll read the above in the evening... I have 10 minutes to get dressed and leave the apartment to work and I'm currently in my underpants :P
10:44 batman Zoffix: hehe. good luck :)
10:52 Kripton joined #mojo
10:56 jojo Do you know if its possible, in prefork mode, for my workers to talk to the Manager ?
10:57 batman jojo: they do it all the time to let the manager know they are running and doing stuff.
10:58 batman jojo: but i don't think that's really the answer you're looking for.
10:58 batman please state what you want to accomplish.
10:59 Newbie__ joined #mojo
11:01 polettix joined #mojo
11:04 mattastrophe joined #mojo
11:35 cpan_mojo Mojolicious-Command-migration-0.13 by LIKHATSKI https://metacpan.org/release/LIKHATSKI/Mojolicious-Command-migration-0.13
11:42 polettix joined #mojo
11:45 neilhwatson joined #mojo
12:18 polettix joined #mojo
12:23 jojo batman: i'd like to create a "/status" route, that will be able to display some informations about various operations done by my workers
12:23 batman jojo: maybe you want this: https://metacpan.org/pod/Mojolicious::Plugin::ServerStatus ?
12:25 jojo hmmm this plugin looks interesting indeed. Maybe I can borrow some code from it so I can display custom status
12:25 jojo thank you batman
12:26 batman jojo: you're welcome :)
12:26 batman it's almost always faster to explain what you want to accomplish than about the specifics on the way there...
12:32 bramirez joined #mojo
12:32 jojo batman: in my Mojolicious::Lite app, I just do a use "Mojolicious::Plugin::ServerStatus" and that's it ?
12:33 batman jojo: no. it's a plugin. https://metacpan.org/pod/Mojolicious::Lite#plugin
12:34 jojo thanks :)
12:34 jojo gonna try that
12:37 eduardow joined #mojo
12:49 nf joined #mojo
12:54 eduardow joined #mojo
13:01 polettix joined #mojo
13:08 asarch joined #mojo
13:21 Vertig0 joined #mojo
13:26 gryphon joined #mojo
13:32 polettix joined #mojo
13:51 zivester joined #mojo
13:58 Grinnz_ marcus: SASL is authentication, unrelated to SSL. i use it on freenode because one channel does not allow you to join unless you're registered, which nickserv tends to take its time doing
14:03 jberger this is kinda cool: http://unicode-table.com/en/
14:05 Grinnz_ nice
14:07 jb360 joined #mojo
14:08 batman Grinnz_: PR is welcome :)
14:09 Grinnz_ batman: heh... unlikely :)
14:15 odc jberger, thanks! it's the first time i see the clinking beer mugs :)
14:16 jberger 🍻
14:16 jb360 joined #mojo
14:18 odc my hexchat uses Deja Vu Mono, which does not have this symbol :/
14:20 ajr_ joined #mojo
14:21 jberger odc is apparently drinking "clinking juice boxes" :-P
14:21 odc haha! pretty much
14:22 odc jberger, you're using convos?
14:22 jberger yeah
14:22 jberger <3
14:22 jberger ❤️
14:22 Grinnz_ hey that one worked
15:22 mattastrophe joined #mojo
15:34 ajr_ joined #mojo
15:44 disputin joined #mojo
16:18 kaare joined #mojo
16:21 niczero joined #mojo
16:21 berov joined #mojo
16:23 niczero jojo: Also worth looking at https://metacpan.org/pod/Mojolicious::Plugin::Log::Access
16:23 niczero if you're interested in a lighter approach
16:26 pink_mist oh, I thought marcus linked to the only 'access' + 'log' search result, so I didn't even consider looking if there was something that wasn't on version 0.001 :>
16:26 polettix joined #mojo
16:27 pink_mist (I was also interested in this)
16:28 Grinnz_ hey, what's wrong with 0.001 if it works :P
16:29 pink_mist (and of course, the one he linked to is actually up to version 0.006, but I guess sco is hard to navigate well enough to determine that)
16:29 Grinnz_ heh
16:30 kaare joined #mojo
16:30 pink_mist Grinnz: in my opinion, if it's working you release version 1.0 promptly :P
16:31 Grinnz_ hehe
16:31 Grinnz_ the Unix::Groups module i'm using for SetUserGroup only had one release
16:31 Grinnz_ but as it says, it's just a thin wrapper over syscalls
16:36 sh4 joined #mojo
16:44 cfedde is there a "best" way to build simple crud using Mojo?
16:46 pink_mist Mojolicious::Lite?
16:46 purl Mojolicious::Lite is, like, just the one file dealy right
16:47 cfedde pink_mist: sure.  but form stuff?  there are like, several plugins and then there is the "just do it" pattern.
16:47 pink_mist oh, I tend to 'just do it' for form stuff
17:06 disputin joined #mojo
17:08 jberger pink_mist: the Perl traditional module minters always used 0.01 or 0.001, and so the culture has grown up around that
17:09 jberger look at modules like Module::Build for example
17:09 jberger all these years later its 0.4211
17:10 jberger cfedde: there are some REST plugins that you might be looking for
17:10 Grinnz "ready for 1.0" is a very abstract concept for some things :P
17:10 jberger pair that with a DBIx::Class model and off you go
17:18 mattastrophe joined #mojo
17:26 trone joined #mojo
17:47 dod joined #mojo
18:16 amon joined #mojo
18:18 ToApolytoXaos joined #mojo
18:23 coolo joined #mojo
18:24 ZoffixWork joined #mojo
18:27 ZoffixWork Hey. the docs for websocket ->send say it's non-blocking, but for some reason all the ->send()s in this code get queued up until the end of the function: http://fpaste.scsys.co.uk/477042
18:27 ZoffixWork i.e. I don't get any messages in the browser, until all that stuff finishes running.
18:28 ZoffixWork And I want for the messages to arrive as soon as I send them.
18:31 jberger ZoffixWork: http://mojolicio.us/perldoc/Mojolicious/Controller#send
18:31 jberger nonblocking with a callback, as usual
18:32 jberger oh, nm
18:32 jberger I'm wrong
18:32 jberger that's the drain callback
18:32 jberger well its kinda the same thing
18:33 jberger the funny thing is you are actually asking for the blocking behavior ;-)
18:33 jberger you want it to send now, not once the function is complete
18:33 jberger that's blocking
18:33 ZoffixWork heh
18:33 jberger and the drain callback gives it to you
18:33 jberger kinda
18:34 ZoffixWork hm
18:36 ZoffixWork This still results in "Logging in" sent after the sleep though: http://fpaste.scsys.co.uk/477048
18:38 ZoffixWork Which is weird, because there's even an example like that in the docs titled "Make sure previous message has been written before continuing"
18:39 Grinnz_ ZoffixWork: you could put it in a delay, and then use the callback to go to the next delay step
18:39 jberger Grinnz_: correct
18:40 ZoffixWork That's a lot of delays and a lot of callbacks :) I'm sending 6 messages.
18:40 jberger the delay in conjunction with the drain callbacks implements sequential procesing
18:40 jberger just steps
18:40 Grinnz_ ZoffixWork: done correctly it would be all one delay
18:40 ZoffixWork plus, I don't know how to use delay :P
18:40 jberger 6 steps
18:40 Grinnz_ ZoffixWork: well it sounds like a good time to learn ;)
18:40 ZoffixWork haha :)
18:40 ZoffixWork What module is it from? Mojo::IOLoop or something?
18:40 Grinnz_ Mojo::IOLoop::Delay, or Mojo::IOLoop->delay
18:41 Grinnz_ usually in a Mojo app you want to use the delay helper to wrap it
18:41 ajr_ joined #mojo
18:41 jberger Grinnz_: perhaps not in a websocket context
18:41 Grinnz_ yeah, not sure about that
18:41 jberger though maybe
18:41 purl though maybe is probably a code smell
18:42 Grinnz_ there's nothing to render an exception in a websocket
18:42 * jberger sucker punches purl
18:42 Grinnz_ so that part wouldnt be useful
18:42 jberger damn, that would be a good one
18:42 Grinnz_ don't need to worry about render_later either
18:42 Grinnz_ probably don't need to keep the $tx around
18:43 jberger not sure about that one ^^
18:43 jberger probably not, but I don't usually use it this way
18:43 Grinnz_ well, websocket stuff is already all done async
18:43 Grinnz_ so it must be keeping it around anyway
18:44 Grinnz_ at least thats my cursory logic :P
18:44 Grinnz_ jberger: dont you have an article or something for ZoffixWork to read about delays :P
18:45 jberger I do, though its not in this context
18:45 Grinnz_ it should be applicable still
18:45 jberger http://blogs.perl.org/users/joel_berger/2013/10/writing-non-blocking-applications-with-mojolicious-part-1.html
18:45 jberger three parts
18:45 jberger (did I get to sequential steps ... )
18:45 ZoffixWork Well, now I got the opposite problem. The first message gets delivered right away, but no other messages arrive (and socket still remains open). Using this: $c->delay( sub { $c->send('First'); }, sub { $c->send('Second'); } );
18:46 Grinnz_ ZoffixWork: right, you need to actually use the delay callbacks
18:46 jberger hehe, actually I think I didn't get there
18:46 ZoffixWork K, I'll read up on that
18:46 Grinnz_ $delay->begin returns a callback, which you can pass to the send() call for proceeding to the next step
18:46 Grinnz_ i.e. $c->send('First', shift->begin)
18:46 jberger what Grinnz_ said
18:46 ZoffixWork ->send should really DWIM
18:46 jberger ZoffixWork: it is
18:47 jberger :-P
18:47 Grinnz_ it does, just not in a synchronous way :P
18:47 ZoffixWork I don't see why it's hanging around, waiting for the function to finish :P
18:47 jberger that's asynv
18:47 jberger schedule a bunch of stuff
18:47 jberger it runs later
18:47 jberger remember you only have one execution thread
18:48 jberger you are blocking the loop while anything else is happening
18:48 jberger like running that code
18:48 jberger once your code runs, it returns to the loop, which does things that are pending
18:48 jberger also why you never want to block the loop for long
18:48 ZoffixWork K, I get it now
18:49 Grinnz_ https://metacpan.org/pod/Mojo::IOLoop::Delay#begin this method is hopefully also clarifying to how delays progress
18:50 Grinnz_ method description*
18:53 ZoffixWork Sweet. Got it working the way I want to. Thanks jberger++ Grinnz_++
18:54 * Grinnz_ probably needs to apply the same logic to the websocket app he was working on a while ago
19:13 jberger \o/
19:28 cfedde jberger: the REST plugin looks like the right way to do this.  Thanks!
19:28 jberger cfedde: IIRC there are a few of them, I haven't evaluated each but they are similar
19:28 jberger and you're welcome
19:31 cfedde Like normal. The algorithm is: pick somethiging. Use that till it does not meet your needs. repeat till dead.
19:31 mattastrophe joined #mojo
19:42 jberger cfedde++
19:43 * jberger kicks purl, just for the fun of it
19:55 dod joined #mojo
20:33 absolut_todd joined #mojo
20:35 mattastrophe joined #mojo
20:38 ajr_ joined #mojo
20:40 melo joined #mojo
20:44 cfedde Mojolicious::Plugin::REST fails install because it can't locate object method "bridge" via package "Mojolicious::Routes"
20:45 * cfedde gets out his shovel.
20:45 Grinnz_ cfedde: something needs to be updated for 6.0.
20:47 cfedde so it would seem
20:50 cfedde looks like it is fixed in the git repo version
21:00 melo1 joined #mojo
21:21 Zoffix batman, yeah, I know CSS is also valid SASS. I'm using SASS, actually, despite my keeping my .scss files in /CSS/ :) I'll try your suggestion the next time I'm working on that site. Thanks, batman++
21:22 ajr_ joined #mojo
21:37 ajr_ joined #mojo
21:37 jb360 joined #mojo
21:44 ajr_ joined #mojo
22:00 mattastrophe joined #mojo
22:01 melo joined #mojo
22:06 zackiv31 joined #mojo
22:35 cpan_mojo Mojo-Cloudstack-0.02 by HRUPP https://metacpan.org/release/HRUPP/Mojo-Cloudstack-0.02
23:11 mattastrophe joined #mojo
23:12 Grinnz_ i'd like to make a Mojo::EventEmitter clone that i can use as a Moo role, but i have no idea what namespace it should goin
23:13 Zoffix Moo::EventEmitter ?
23:13 Grinnz_ i found this one which is not a role, and definitely is in the wrong namespace: https://metacpan.org/pod/AnyEvent::Emitter
23:13 Grinnz_ it's not part of the Moo project, that seems silly
23:14 Zoffix Heh, that one looks like a code copy/pasta under a different namespace.
23:15 Zoffix He just changed Mojo::Base pre-req to sub new {...} and $ENV{MOJO_EVENTEMITTER_DEBUG} to $ENV{EMITTER_DEBUG}
23:15 Grinnz_ yeah. making it a role would not be much different
23:16 Grinnz_ but, different enough that i can't use that.
23:16 Zoffix Well, it'd be a role.
23:16 Grinnz_ i mean, code-wise
23:16 Zoffix Can you use Mojo::EventEmitter is a role?
23:17 Grinnz_ no, you can only use Role::Tiny or Moo::Role classes as a role
23:17 Grinnz_ in Moo.
23:18 Grinnz_ my current idea is http://paste.fedoraproject.org/219693/40690143/, which would break if Mojo::EventEmitter introduced any private methods or anything like that.
23:18 Grinnz_ so to really solve it i have to clone the whole code
23:19 Zoffix I'd say roll with that. Pretty good solution IMO. No copy/pasta, less things to accidentally break.
23:20 Grinnz_ more likely to break on sri's whim though :P
23:21 Zoffix I doubt it's actually be just a "whim." You'd likely want those changes to propagate to your fork anyway and test breaking due to Mojo::EventEmitter changes will keep you in the loop of any such changes.
23:21 Grinnz_ say he decides to make emit call a private _emit method that he adds. then i have to add a redirect for that method as well. or if it uses an attribute... etc
23:21 Zoffix *shrug*
23:27 Grinnz_ i found a better solution anyway. http://paste.fedoraproject.org/219697/14310412
23:27 Grinnz_ less direct, but functionally ends up working the same, those method calls just get delegated to an EventEmitter object it holds
23:28 Zoffix sweet
23:33 jberger Grinnz_: MUCH better
23:37 Grinnz_ yeah... took me a while to consider the combination of role and delegation
23:42 mattastrophe joined #mojo

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