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

IRC log for #mojo, 2015-09-23

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

All times shown according to UTC.

Time Nick Message
00:00 jontaylor joined #mojo
00:03 ZoffixMobile joined #mojo
00:35 Grinnz joined #mojo
00:41 jb360 joined #mojo
00:51 PryMar56 joined #mojo
01:03 good_news_everyon joined #mojo
01:03 good_news_everyon [mojo] kraih tagged v6.21 at fa2ab0e: http://git.io/vnwMf
01:03 good_news_everyon left #mojo
01:05 good_news_everyon joined #mojo
01:05 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vnwMc
01:05 good_news_everyon mojo/master baa77ff Sebastian Riedel: bump version
01:05 good_news_everyon left #mojo
01:08 meshl joined #mojo
01:44 Zoffix ironic the bot doesn't announce the release of Mojolicious itself :)
01:45 Zoffix sri++
01:48 SmokeMachine joined #mojo
01:51 Lucas1 joined #mojo
01:55 cpan_mojo Test-Mojo-Role-SubmitForm-1.001004 by ZOFFIX https://metacpan.org/release/ZOFFIX/Test-Mojo-Role-SubmitForm-1.001004
02:17 sri Zoffix: that was fast :)
02:17 sri you might like Mojo::Util::dumper for debugging
02:18 Zoffix :)
02:24 * sri likes :checked more than [checked]
02:26 sri interesting you like $el->attr('name') more than $el->{name}
02:30 Grinnz Zoffix, your changelog versions are... not quite correct
02:31 davido_ joined #mojo
02:32 Zoffix Grinnz, yeah, thanks :) I forgot to add V=blah before dist release at one point :)
02:34 Zoffix sri, a quick "find in page" on Mojo::DOM docs, I don't see that as a documented method of accessing attributes
02:34 Zoffix s/,\K/ based on /;
02:35 jberger http://mojolicio.us/perldoc/Mojo/DOM#hash
02:35 Zoffix Ah :)
02:35 Zoffix I'm yet to read the docs, that's why :)
02:35 jberger :p
02:36 jberger If you want to golf, request_ok already returns self
02:38 * sri has been wondering if the xml declaration should have its own node type
02:38 sri it looks and can be parsed as a processing instruction, but isn't actually one
02:39 sri +like
02:39 jberger Zoffix: also interesting that you each then map, not that it matters too much
02:40 Zoffix I'm new to Mojo stuff... until a couple days ago I still just @{} derefed any time I dealt with Mojo::Collection :)_
02:41 Zoffix And then "manually" worked on the resulting list
02:42 jberger It's fine, I just like chaining
02:43 jberger If you want to see chaining taken beyond its logical conclusion:
02:43 sri fluent interfaces \o/
02:43 jberger https://metacpan.org/pod/Mojo::Autobox
02:43 noganex_ joined #mojo
02:45 sri jberger just doesn't know when to stop :o
02:45 Grinnz autoautobox!
02:45 sri has science gone too far?
02:46 jberger sri: you knew about that one!
02:47 jberger You could have stopped me!
02:47 * jberger sees ripple rings in his water cup
02:47 * jberger must go faster
02:49 Grinnz Acme::Autobox::Box - a box of autoboxes
02:49 sri it's interesting to see more complex perl6 modules, but the lack of documentation culture is sad https://github.com/supernovus/exemel
02:50 sri really digging grammars https://github.com/supernovus/exemel/blob/master/lib/XML/Grammar.pm6
02:50 Grinnz thats cool
02:51 jberger Grammars are way cool
03:03 kaare joined #mojo
03:55 sri Zoffix: just thought of a case you're not handling correctly i believe
03:55 sri MOJO_DAEMON_DEBUG=1 perl -Mojo -E 'a({inline => "<form action=/ method=POST><input type=checkbox checked name=foo value=bar><input type=checkbox checked name=foo value=baz><input type=submit></form>"})->start' daemon
03:56 sri you need foo => ['bar', 'baz']
03:58 sri this is the kinda stuff that really annoyed me when i made the original version of Mojo::DOM::val with <form> support ;p
04:00 disputin joined #mojo
04:01 disputin joined #mojo
04:01 cstamas joined #mojo
04:39 disputin joined #mojo
04:46 bpmedley_ https://bitbucket.org/snippets/bpmedley/z9gyo <-- Would a Mojo::IOLoop repeating event processor be useful?
05:00 melo joined #mojo
05:03 inokenty-w joined #mojo
05:18 davido_ joined #mojo
05:44 panshin joined #mojo
06:06 marcusr o/
06:06 marcusr sri: Made golden hunter today \o/ #hs
06:14 dod joined #mojo
06:19 dod joined #mojo
06:37 Shaeto joined #mojo
06:47 panshin joined #mojo
07:15 Vandal joined #mojo
07:17 eseyman joined #mojo
07:26 trone joined #mojo
07:35 jberger joined #mojo
07:55 dod joined #mojo
08:00 odc joined #mojo
09:04 vanHoesel joined #mojo
09:05 arthas joined #mojo
09:13 meshl joined #mojo
09:23 dod joined #mojo
09:30 melo joined #mojo
09:39 dod joined #mojo
10:01 asarch joined #mojo
10:15 amon joined #mojo
10:57 dvinciguerra joined #mojo
11:25 nic bpmedley_: Is that so the events survive server restarts?
11:26 jontaylor joined #mojo
11:38 jberger bpmedley_: I don't get it
11:39 stephen joined #mojo
11:45 bpmedley_ The rationale for something like this is to provide repeating events on a per application basis.
11:47 nic I haven't read it in any detail - what does it add on top of IOLoop's recurring functionality?
11:47 nic (I'm asking cos I'm also working on something with a cron-like api)
11:47 bpmedley_ nic: The ability to schedule a recurring job using a crontab like like.
11:48 bpmedley_ *like line
11:48 nic ok, so the same as what I have already
11:48 bpmedley_ nic: Perhaps, what are you using now?  Cron?
11:48 nic let me know if the scope extends further
11:49 nic (cos it might be nice to drop mine in favour of something someone else is maintaining :) )
11:49 bpmedley_ nic: May I see what you use now?
11:49 nic bpmedley_: it's the same (currently) but using Mojar::Cron
11:49 nic (which has slightly fewer bugs)
11:51 nic oh, that's inaccurate...
11:51 nic Time::Crontab doesn't do very much
11:52 bpmedley_ Cool.  May I see your logic for running the jobs?  What is inaccurate?
11:52 nic It's Algorithm::Cron that I contributed to
11:52 nic but I stopped sending bug fixes cos I wasn't getting any credit
11:52 bpmedley_ nic: No credit is extremely frustrating
11:53 nic esp when you're making fundamental fixes to someone's broken algorithm
11:53 nic anyway, Mojar::Cron doesn't have any known bugs currently
11:54 nic however... I'm not v happy with the underlying datatypes for Mojar::Cron; at least one of which isn't as useful as it could be
11:54 nic It's space- and time-efficient (more than alternative implementations) but it's not very nice to code with
11:55 bpmedley_ Interesting.  Do you know of any bugs in Time::Crontab?  I'll have to look at your code sometime.
11:56 nic like I said, Time::Crontab does very little, so I'd be surprised if it was buggy, hence me saying my earlier comment was inaccurate
11:56 nic (was assuming you were using the more functional (but buggy) package)
11:57 bpmedley_ Gotcha.  May I see your Mojo::IOLoop code that wraps Mojar::Cron?
11:57 nic My equivalent for what you have is v brief and obvious
11:57 nic IOLoop lets you schedule something for n secs in the future; Mojar::Cron tells you when that should be, so it's just a case of passing it on
11:58 nic But the interesting bit is when you extend it
11:58 bpmedley_ Sounds simple and useful.  Any way i could see it?
11:59 nic no, the discussion about the client allowing that code to be public hasn't been made yet
12:00 bpmedley_ Ahh.  That's cool, it's good to be ethical.
12:00 bpmedley_ Any features you would like to see added to mine?
12:01 nic but seriously, what we're talking about is obvious, and is little more than one line
12:03 bpmedley_ Understood.  I was curious about the methodology for executing code.  Do you use sub references, or do you load classes dynamically and execute a subroutine, or something else?
12:04 nic I'll tell you what it should be doing, rather than what the poor client currently has ;)
12:04 bpmedley_ Please
12:04 nic For the reqs here, at the scheduled time it should drop the job into Minion
12:05 bpmedley_ Hrmm.  That's a good idea.
12:06 nic But they also need some way of throttling resource use; ie the things holding us up are more about how to make best use of Minion
12:07 nic eg "a max of three jobs that batter Platform A may run concurrently"
12:08 nic eg "if lag on Platform B is greater than x then don't launch any related low priority jobs"
12:09 nic I'm guessing those are fairly easy to do, I just haven't got there yet
12:09 nic (been talking about this since 18 months before Minion was released; still not there yet :) )
12:09 bpmedley_ nic: Are the -t/-j options to a minion worker sufficient?
12:10 nic dunno
12:11 bpmedley_ jberger: Given mine and nic's discussion, does the code make more sense?
12:12 nic btw, mojo just rescued one of my dev boxes \o/
12:13 bpmedley_ How so?
12:13 nic a filesystem error had broken anything ssh-related
12:13 nic the only way to get files onto it was via http
12:13 jberger bpmedley_: it does and yet I'm concerned with how it would work under hypnotoad
12:13 nic "mojo generate lite_app rescue"  :)
12:13 jberger nic++
12:14 bpmedley_ jberger: My assumption is that there would be a separate process running the repeatable code.  That's what the "command repeat" is for.
12:14 jberger Ah
12:14 bpmedley_ nic: That's all the awesome.
12:15 jberger In that case why not just use cron?
12:15 bpmedley_ I want the code to work on BSD, Linux, OS X, Windows, Unix
12:16 jberger Also, what if a repeated task blocks?
12:16 jberger I can see it as a useful way to drop things into minion perhaps
12:16 nic bpmedley_: does it currently have a way to limit how many instances of a job may run concurrently?
12:17 bpmedley_ I see your point; however, I think the current methodology will allow the user to fork or somesuch to handle a blocking call.  Did I say that right?
12:17 bpmedley_ nic: No, mine just fires them off without thinking.. :)
12:18 nic Windows has its own equivalent of cron, so if you're not extending beyond what cron can do, there doesn't appear to be much/any point
12:19 neilhwatson joined #mojo
12:19 bpmedley_ nic: A valid point.  How can I make mine more useful?
12:19 nic Mojolicious::Command eliminates much of the motivation to go non-cron
12:35 ajr_ joined #mojo
12:44 panshin joined #mojo
12:47 ZoffixWork joined #mojo
12:50 panshin joined #mojo
12:53 ZoffixWork sri++ thanks, you were right.
12:55 cpan_mojo Test-Mojo-Role-SubmitForm-1.001005 by ZOFFIX https://metacpan.org/release/ZOFFIX/Test-Mojo-Role-SubmitForm-1.001005
13:00 dvinciguerra joined #mojo
13:09 sri hmm, nic is now the second person that wants throttled minion jobs
13:11 marcusr poor minions
13:13 marcusr http://emblemsbf.com/img/36532.jpg
13:15 sri it seems the most common way to implement it is actually by having the job resquedule itself once it is done
13:16 sri so, you'd have your own queue with throttled jobs waiting, and only ever two real jobs active at any given time
13:18 nic that's how I'm currently doing it, but I should add a timeout-killer so that a stalled/failed job doesn't bring a halt to that line of jobs
13:19 nic I think the default with a mysql connection is to wait 2 hrs before calling it a day and declaring failure
13:19 * nic found that out the hard way... and was a little surprised
13:21 sri the other way would be a custom worker for that task with a -j 2 value
13:21 sri not sure which i prefer
13:22 Kripton joined #mojo
13:22 sri this is mostly for dealing with rate limits right?
13:23 sri if that's the case you could also not do anything special and just handle rate limits gracefully, by requeueing the job with a delay in case of limit reached
13:24 nic so that job would be put a bit further back in the queue effectively?
13:25 sri yea, you've reached the rate limit for this hour, requeue with a delay of 60 minutes
13:26 nic so are you thinking it's the queue consumer enforcing the limits?
13:26 nic (I guess it has to be, but I had previously been thinking the queue feeder would apply the limits)
13:26 sri the web api enforces its limit
13:27 sri i'm assuming your jobs use something like the twitter api
13:27 nic I'm not sure; can take a look later today; need to dash to a meeting
13:36 sri only possible new core feature for minion regarding this would be a -T flag, as bpmedley suggested yesterday, as far as i can see
13:37 sri and that's just a little convenience for starting job specific workers
13:38 sue joined #mojo
13:45 gryphon joined #mojo
13:52 kanishka joined #mojo
13:55 mattastrophe1 joined #mojo
14:03 hernanGOA joined #mojo
14:09 bpmedley_ sri: I also have the need to only launch N specific jobs.  It's because we're launching a proxy and only have N ports available for the proxy.  Then, a websocket connects to the proxy's port.
14:11 bpmedley_ I believe -T would work for us.  Would you like a patch?
14:11 panshin joined #mojo
14:13 panshin joined #mojo
14:14 bpmedley_ So, we would start at least two minions: -T proxy  and -t proxy -j 9.  Also, on different servers, we could launch -T proxy for other minions.  Does that make sense?
14:18 sri bpmedley_: so far it's only you and Onigiri who are intrested in -T
14:19 jberger I think in the context of -t it makes sense to have -T
14:19 sri i think it needs to be used by more to be worth it
14:19 sri jberger: it's only convenience, not new functionality
14:19 sri you can already do it with -t
14:19 bpmedley_ Understood.  That makes sense.
14:19 sri just more verbose
14:19 jberger I WOULD have needed it when I was going to use minion for a certain task, but then once it became clear that it did not guarentee order it wouldn't work anyway
14:20 jberger true, verbose and breaky if you add more tasks
14:20 sri if you add more tasks, you restart your workers anyway
14:20 jberger but you have to remember to add the new task to the exclude
14:21 sri bpmedley_: i imagine a patch would be super simple, like 2 lines at most
14:21 bpmedley_ sri: You're probably correct; however, the end goal is to keep minion as simple as possible, eh?
14:21 sri anyway, point is, jberger thinks it makes sense, but doesn't actually need it ;p
14:21 sri i want to hear from people that would use it
14:22 sri bpmedley_: correct, as with all my projects basically ;)
14:22 bpmedley_ Right now a bash script will be more than sufficient for us.
14:22 * sri always asks himself how many features he can remove and get away with
14:24 sri you could also hack it in yourself, delete app->minion->tasks->{proxy} if $ENV{MYAPP_NO_PROXY};
14:25 sri if it becomes that inconvenient to update the -t flags
14:26 Rallias joined #mojo
14:26 mishanti1 Any thoughts on http2-support?
14:32 hernanGOA joined #mojo
14:45 jberger mishanti1: what with that recent report on dropped packets killing http2 performance, who knows if anyone is going to use it
14:49 meshl joined #mojo
15:01 batman that could be the best news.
15:01 batman don't think we're that lucky though :/
15:07 sri unlikely
15:07 sri lots of people and companies are heavily invested in http/2
15:08 sri it might accelerate http/3 though
15:08 * sri shrugs
15:08 Grinnz_ is there a http/3 idea already?
15:08 sri many actually
15:08 Grinnz_ heh
15:09 sri all the things that break backwards compatibility with http/1.1 basically
15:10 sri or the quic protocol https://www.chromium.org/quic
15:10 mishanti1 Interesting. :) I didn't know about that.
15:11 sri re http/2 in mojolicious, i don't think we can do it without funding
15:11 sri making a really good implementation takes a lot of time
15:11 mishanti1 sri: What kind of funding would be needed?
15:11 mishanti1 ballpark
15:12 sri 6 months full-time work at least
15:14 sri so yea, it's rather unrealistic in the not so distant future
15:17 sri a bad implementation is not too hard, but you want to optimize stream priorities, server push and stuff
15:17 dvinciguerra joined #mojo
15:24 sri some vendors don't seem to trust server push though, apple left it out
15:35 sri even the nginx implementation was sponsored by companies
15:37 cfedde Is there some mojo way to set the process name?  I typically do it by setting $0 but that does not seem to be working in a mojo app.
15:38 batman cfedde: Mojo::IOLoop->next_tick(sub {$0="foo"}); # this works for the workers
15:39 cfedde thanks!
15:39 batman not the main process (if you're using prefork or hypnotoad)
15:39 batman cfedde: why do you need that?
15:40 cfedde batman: someone had an idea about how to monitor different "kinds" of childeren in hypnotoad from nagios using the process name.
15:42 cfedde mojo is being used to process redis jobqueue and insert to ES.  As well as providing a REST endpoint into this activity. Mojo is providing the prefork and the event loop.
15:58 Mikey joined #mojo
16:09 marcus red hot stepchildren
16:13 PryMar56 joined #mojo
16:20 ajr_ joined #mojo
16:28 sh4 joined #mojo
16:32 mishanti1 marcus: You realize that you typed that into irc, not <INSERT FAVORITE X-RATED SITE HERE> right?
16:33 marcus mishanti1: i was imagining different "kinds" of children.
16:34 mishanti1 Thats good. :)
16:34 mishanti1 ...and assumed. Just couldn't let it pass. :p
16:35 Rallias joined #mojo
16:40 marcus mishanti1: I worry about your porn fetishes now.
16:44 sri that really doesn't belong here
16:48 marcusr sorry, sri
16:50 cpan_mojo Business-Payment-SwissESR-0.11.1 by OETIKER https://metacpan.org/release/OETIKER/Business-Payment-SwissESR-0.11.1
16:51 hernanGOA joined #mojo
17:22 dod joined #mojo
17:26 meshl joined #mojo
17:27 PopeFelix Children of whatever kind aside, if i have a controller action that serves a static file via $c->reply->static($path), do I need to do $c->rendered afterward?
17:28 Grinnz no
17:30 PopeFelix OK, then I'm doing something wrong.  I just want a quick mock app to serve a static file, but I keep getting a 'not found' error.
17:30 PopeFelix kinda beating my head against the wall here.
17:30 tcohen joined #mojo
17:34 vanHoesel joined #mojo
17:34 shadowpaste "PopeFelix" at 217.168.150.38 pasted "Why won't this work?" (17 lines) at http://paste.scsys.co.uk/499189
17:35 PopeFelix Am I missing something fundamental here?
17:35 Grinnz the filename ->reply->static takes is relative to the static router
17:35 Grinnz https://metacpan.org/pod/Mojolicious::Static#paths
17:36 PopeFelix oh, I think I see.
17:36 PopeFelix Even though I'm passing a static path, it's being interpreted relative to the "serve from" directory?
17:37 Grinnz https://metacpan.org/pod/Mojolicious::Plugin::DefaultHelpers#reply-static
17:37 Grinnz follow the links from there and that should help
17:38 PopeFelix Thanks.
17:42 Onigiri So Mojo::Pg::Transaction, am I wrong to expect it to start a transaction even if autocommit is enabled?
17:43 Grinnz you normally get one of those from $db->begin which does start one yes
17:44 Onigiri Oh, so I'm not supposed to hit the transaction thing directly. Got it. Thanks!
17:45 Grinnz yeah, it's a scope guard, i.e. when it goes out of scope it makes sure the transaction rolls back if not committed
17:45 Grinnz thats really all it does
17:46 trone joined #mojo
17:59 sri hmm, i guess it would make sense if the Mojo::Pg::Transacton object actually started the transaction
17:59 sri Mojo::Pg::Database::begin doing it seems to be for legacy reasons
18:01 sri not that it makes much of a difference
18:03 sri one less accessor call, so i guess it's better
18:03 vanHoesel joined #mojo
18:22 hernanGOA joined #mojo
18:36 panshin joined #mojo
18:52 sri looking through job queue workers, the -t option is pretty common, but i have yet to find a -T
18:53 sri it appears that limiting what tasks a worker is allowed to handle is mostly just about priority
18:54 sri like handling jobs for paying customers faster
18:55 bpmedley_ Thanks for looking!
18:56 sri i'm actually curious how people out there handle the rate limit problem
18:57 sri but i do have a hunch now that reschedule on hitting the rate limit is the way
19:06 sri celery actually has a built in rate limit http://celery.readthedocs.org/en/latest/userguide/workers.html#rate-limits
19:10 ZoffixWork joined #mojo
19:11 sri of course celery is a huge mess :)
19:11 bpmedley_ For us, one of the issues is that our proxy job only supports N number of ports.  When all the ports are in use we shouldn't enqueue any more.  What we do is check the ports to see if it's bound to before launching enqueue.
19:13 sri in the python world job dependencies seem pretty popular
19:13 sri like, a job can only be handled if all jobs it depends on are finished
19:14 sri ->enqueue(foo => {depends_on => [5, 23]})
19:15 sri i kinda like it, but it seems really hard to implement right
19:22 Onigiri In the other implementations you're finding, perhaps people are using a different option to aquire a list of possible tasks... then filtering and spawning with many -t's for the rest.
19:26 sri hmm, i guess job dependencies are kinda complicated because of side effects
19:27 sri most of them might solve themselves though, like if a job you depend on has an error or gets restarted
19:28 sri error is easy, but restarted can be a bit awkward
19:29 sri Onigiri: nothing i've seen would suggest that
19:30 sri but feel free to link examples
19:30 genio hmm.  https://www.nginx.com/blog/launching-nginscript-and-looking-ahead/
19:33 Onigiri Perhaps I'm a bit silly for wanting to launch ~12hr+ tasks
19:33 disputin joined #mojo
19:55 neilhwatson joined #mojo
19:58 Kripton joined #mojo
20:23 disputin joined #mojo
20:58 sri joined #mojo
21:00 sri joined #mojo
21:01 sri joined #mojo
21:05 sri joined #mojo
21:06 sri joined #mojo
21:07 sri joined #mojo
21:09 sri joined #mojo
21:11 ZoffixWork joined #mojo
21:12 mattastrophe joined #mojo
21:30 cpan_mojo Mojo-PDF-1.001001 by ZOFFIX https://metacpan.org/release/ZOFFIX/Mojo-PDF-1.001001
21:34 jberger Zoffix: neat
21:35 jberger Zoffix: does PDF::Reuse need external stuff to do its job?
21:36 jberger for example there are several wkhtmltopdf wrappers and a few PDF modifiers, but I didn't think that there were any (good) ways of generating raw PDF on CPAN
21:36 ZoffixWork jberger, thanks, it's far from complete... In fact, I think I'll be reading the spec and making my own stuff because PDF::Reuse is terrible and there isn't much else for PDF making that I like
21:36 ZoffixWork jberger, no, it doesn't need anything else
21:36 ZoffixWork But it uses package variables :/
21:37 Grinnz_ too bad that Graphics::Color brings in all of Moose...
21:37 tempire PDFs are the devil
21:37 ZoffixWork I need something workable by Sept. 30, so I'm just using it as a crutch ATM.
21:37 panshin joined #mojo
21:37 tempire particularly signature fields
21:37 jberger ZoffixWork: we use wkhtmltopdf and mojo html
21:38 ZoffixWork Grinnz_, yeah, it's temporary. I emailed Number::RGB author for comaint so I could fix the bug and use that instead
21:38 jberger then again, personally I'm partial to LaTeX
21:38 Grinnz_ cool
21:38 Grinnz_ the other thing i'd ask is, is Mojolicious actually going to be needed? right now it only looks like you're using it for Mojo::Base attributes but you're already using Moo :P
21:38 jberger I almost released a small Mojo::Template wrapper with good defaults for PDF once :-P
21:39 jberger chained setters
21:39 ZoffixWork jberger, I briefly used PDF::WebKit (that I believe uses wkhtmltopdf under the hood) and it was freezing on the files I wanted it to generate.
21:39 Grinnz_ https://metacpan.org/pod/MooX::ChainedAttributes
21:40 ZoffixWork Also, as a designer fluent in making PDF documents, I rather like the ability of using an existing PDF as a template :P
21:40 Grinnz_ i used that for something or other, it seems decent enough
21:40 jberger this doesn't sound like a ringing endorsement from the author: "Chaining is a questionable feature to support. It leads to all kinds of crazyness, all of which just cause developers pain. It works with some things like jQuery, but typically it is to be avoided."
21:40 bpmedley_ ZoffixWork++
21:40 Grinnz_ yeah i just ignored that part of the docs :P
21:40 ZoffixWork Grinnz_, last night mst convinced me to try out Moo again instead of Mojo::Base... so I think what you're seeing is me right in the middle of that process lol :P
21:42 jberger I like Moo, but I don't use it until I need clearers/triggers etc
21:42 jberger that doesn
21:42 jberger 't mean you shouldn't use it of course
21:42 Grinnz_ same, but i tend to run into those cases quickly if i'm doing anything complicated
21:42 Grinnz_ and if i'm not, i can usually write up the accessors myself in 10 lines
21:43 Grinnz_ and avoid using anything :P
21:43 Grinnz_ if it's already a Mojo project of course i'll use that
21:47 Grinnz_ for example https://metacpan.org/source/DBOOK/App-RewriteVersion-0.002/lib/App/RewriteVersion.pm#L13
22:03 sri joined #mojo
22:04 mattastrophe joined #mojo
22:06 meshl joined #mojo
22:06 ZoffixWork Oh fun
22:06 ZoffixWork How do I check whether an empty attribute exists? This gives me undef: perl -Mojo -wlE 'say r x(q{<input type="checkbox" checked>})->at("input")->attr("checked")'
22:07 sri exists $el->{checked}
22:07 sri exists $el->attr->{checked}
22:07 ZoffixWork Thanks.
22:08 ZoffixWork Oh.. also this ->matches(":checked")
22:08 sri i told you about that yesterday ;p
22:08 ZoffixWork :)
22:16 cpan_mojo Test-Mojo-Role-SubmitForm-1.001006 by ZOFFIX https://metacpan.org/release/ZOFFIX/Test-Mojo-Role-SubmitForm-1.001006
22:38 panshin joined #mojo
22:43 * sri is still amazed every time nytprof tells him that weaken is a bottleneck in Mojo::DOM::HTML
22:45 disputin joined #mojo
22:57 ajr_ joined #mojo
23:25 mattastrophe joined #mojo

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