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

IRC log for #mojo, 2015-07-30

| 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:16 meshl joined #mojo
00:31 mattastrophe joined #mojo
01:36 mojoex joined #mojo
01:38 mojoex in templates, i have wrapper.html.tt. Then i have other.html.tt which extends wrapper. Then i have other2.html.tt which extends other.html.tt. Then i other3.html which extends other2.html
01:38 mojoex this is supposed to work, right ?
01:48 ashleydev joined #mojo
02:11 thowe joined #mojo
02:50 noganex_ joined #mojo
03:49 melo joined #mojo
04:09 kaare joined #mojo
04:15 ashimema is there a recommended perlcriticrc out there for working with mojo apps?
04:16 ashimema I thought I'd seen sri stick one up some time.. but perhaps I was thinking about perltidyrc as I can't find a critic one..
04:17 Grinnz i don't think sri has any perlcritic, i put up Perl::Critic::Freenode recently which mojo passes for the most part ;)
04:18 ashimema must have been the perltidyrc in the mojo repo I was thinking of with sri then..
04:18 ashimema thank Grinnz, I'll take a quick look..
04:18 Grinnz yes, the perltidyrc is used a lot for mojo source
04:18 ashimema it was mostly the disabling of a few warnings (code before strictures for example) I was looking for ;)
04:19 ashimema and though if I found one from another mojo user I could attempt to not miss any ;)
04:19 Grinnz Perl::Critic::Freenode isn't a perlcriticrc but a "theme" of policies meant to be used by themself
04:20 Grinnz but its policies could be put into another perlcriticrc of course
04:20 ashimema just having a read on github now.. I've not played heavily with critic yet so am just putting 2 and 2 together ;)
04:21 Grinnz the "theme" aspect is a little weird, i think it would have been better off going the "bundle" route like Dist::Zilla
04:21 Grinnz but i didn't write it :)
04:22 ashimema I can see this is going to take a tad more thought ;)
04:23 ashimema currently all my code gets checked by critic via vim plugin Syntastic
04:29 zivester joined #mojo
04:42 arpadszasz joined #mojo
04:50 absolut_todd joined #mojo
05:17 arpadszasz joined #mojo
06:01 jontaylor joined #mojo
06:24 dod joined #mojo
06:49 dotandimet joined #mojo
07:16 AndrewIsh joined #mojo
07:21 trone joined #mojo
07:33 eseyman joined #mojo
07:52 Vandal joined #mojo
08:26 Phil22 joined #mojo
09:19 berov joined #mojo
09:22 Phil22 joined #mojo
09:29 tim_ joined #mojo
09:30 melo joined #mojo
09:34 Phil22 joined #mojo
10:23 inokenty joined #mojo
10:31 mattastrophe joined #mojo
11:06 neilhwatson joined #mojo
11:12 dotandimet joined #mojo
11:53 ans joined #mojo
11:59 mattastrophe joined #mojo
12:00 jberger mojoex: I don't think too many people here use the tt plugin, sorry
12:02 salva joined #mojo
12:07 dotan1 joined #mojo
12:16 melo joined #mojo
12:55 gryphon joined #mojo
13:14 hernan605 joined #mojo
13:15 bpmedley joined #mojo
13:15 zivester joined #mojo
13:36 mgrimes joined #mojo
13:38 ans1 joined #mojo
13:48 dotandimet joined #mojo
14:07 dotandimet joined #mojo
14:08 asarch joined #mojo
14:42 buu jberger: I use it!
14:42 buu what did I miss
14:42 jberger buu: http://irclog.perlgeek.de/mojo/2015-07-30#i_10975561
14:44 buu He left =[
14:44 buu I hate templates extending templates anyway
14:50 da5id joined #mojo
15:00 PryMar56 joined #mojo
15:07 melo joined #mojo
15:10 mattastrophe joined #mojo
15:22 oalders joined #mojo
15:37 PotatoGim^Home joined #mojo
15:39 neilhwatson In a mojo test file  (t/01.t) is there a reason why the following  would not return the command output?  Where as outside of mojo it works fine? http://hastebin.com/cidigalepu.pl
15:39 Repaster Repasted text from neilhwatson: http://fpaste.org/249834/14382707/
15:39 neilhwatson query.txt is popluated yet $query_result is not.
15:40 neilhwatson $query_results I mean
15:41 nicomen use strict; use warnings?
15:42 nicomen as there seems to be a typo: my $quey_results = qx{ $query_command };
15:42 nicomen *$query_results
15:42 neilhwatson ack. I thought mojo used strict and warning automatically. :(
15:43 neilhwatson Not in test files it seems
15:43 lluad joined #mojo
15:47 Grinnz_ only Mojo::Base or Mojolicious::Lite do
15:48 neilhwatson thanks
16:06 jberger neilhwatson: you can "use Mojo::Base -strict;" to get the same behavior in scripts
16:07 jberger that behavior is: strict, warnings, utf8 and v5.10 features
16:07 neilhwatson good tip
16:08 disputin joined #mojo
16:09 phillipadsmith joined #mojo
16:10 berov joined #mojo
16:12 chansen joined #mojo
16:21 Dave I done got addicted to Mojo::Base as a substitute for Moose. :)
16:22 mst Mojo::Base is more a limited substitute for Moo
16:22 mst if you didn't need ->meta I dunno why you'd use Moose rather than Moo in the first place
16:23 Grinnz_ pretty much
16:23 Grinnz_ i jump to Moo as soon as i want coercion or triggers or something like that
16:24 mst and the two should pretty much play nice together fine since Moo is designed to subclass non-Moo things
16:26 Dave I've used Moose in older code and been too lazy to move to Moo
16:26 Dave "lazy" is a substitute for a plethora of issues which would only look like excuses to the curmudgeons of us
16:27 mst Grinnz_: honestly, my main things are required constructor args, and builder => sub
16:27 Dave I'm a roles person
16:27 mst I like being told when I forgot a parameter
16:27 mst and I like being able to wrap the builder in a subclass
16:27 Dave and I'm new to Moo
16:27 Grinnz_ ah, subclassing yeah
16:27 mst Dave: you can use Role::Tiny with Mojo::Base too
16:27 Dave Moo >= Moose (assuming scalar comparison)?
16:27 Dave whoa really?
16:27 mst of course you can
16:28 jberger Dave: see Test::Mojo::WithRoles
16:28 Grinnz_ Role::Tiny doesn't do attributes, but yeah
16:28 mst doing shit like that is why I released Role::Tiny separately
16:28 mst rather than just telling people to use Moo::Role
16:28 Dave oh ghod mst
16:28 mst also you can 'use Moo;' extends 'Some::Mojo::Thing';
16:28 Dave someone used "nouvelle" in the docs
16:28 mst and that should work fine too
16:29 Grinnz_ Dave: Moo == (Moose - meta stuff - type system) mostly
16:29 Dave shame on you!
16:29 Grinnz_ you can use Type::Tiny for an easy type system in either, though
16:29 * jberger prefers Type::Tiny anyway
16:29 Dave yeah I have code that uses that meta system, but for small things it's overkill
16:29 * mst prefers Type::Tiny anyway
16:29 mst also remember that if you have a Moo class
16:29 mst my $meta = Moo->meta; will still work
16:30 Dave Moo is pretty new right?
16:30 mst uh, MyMooClass->meta
16:30 mst as soon as you call a method on it, an AUTOLOAD fires, loads Moose, and pretends to be Moose instead
16:30 mst Dave: lol
16:30 buu relative to what?
16:30 mst Dave: yes, it was only released in November 2010
16:30 Grinnz_ it's pretty new relative to the united states of america
16:30 mst Dave: so a lot newer than Moose :)
16:31 Dave heh
16:31 nicomen so yes it's pretty new, but not very new
16:31 mst we declared 1.0 on 2012-07-18
16:31 mst according to Changes
16:31 * Grinnz_ really liked the 2.0 release :)
16:32 jberger mst: wow, has it been that long already?
16:32 Dave so...hm...Role::Tiny doesn't let you define attributes
16:32 Grinnz_ right, you need Moo::Role for that
16:32 mst Dave: well, no, because it's *just* roles
16:33 Dave lol package overload :)
16:33 Dave maybe I'll go use perl 6 for a bit
16:34 Grinnz_ compared to just installing Moose itself, these are nothing
16:34 Dave I know
16:34 sh4 joined #mojo
16:34 Grinnz_ Moo and all its dependencies usually installs slightly faster than Mojolicious for me
16:34 Dave if you could only see the package list on my development box :/
16:34 Dave mysql, postgres, mongodb, cassandra
16:34 Grinnz_ because of mojo's tests :)
16:35 Dave and 100s of CPAN packages
16:35 Dave ya I wrote a "framework" around moose that lets me use one moose object to represent 100k of them
16:35 Dave because moose is so heavy
16:36 Dave since I use meta protocol stuff in that one, not sure moo would buy me much
16:37 mst right, basically, Moo manages to be much lighter and quicker to start up specifically by -not- doing meta stuff
16:37 Dave because post-mojo, I'm using Mojo::Base and finding I don't need all the rest of the stuff
16:37 mst and if you ever need it, it outsoruces it to Moose, because otherwise wtf was the point
16:37 Dave right
16:45 jberger Grinnz_: ever use HARNESS_OPTIONS=j9
16:45 jberger ?
16:46 Grinnz_ for cpanm?
16:46 jberger yeah
16:46 jberger then the tests run in parallel
16:46 Grinnz_ cool
16:53 bjakubski joined #mojo
17:08 Phil22 joined #mojo
17:38 bd mst: doesn't moo not do the attribute type stuff?
17:40 mst bd: Moo has no built in type system, but Type::Tiny works fine
17:41 mst Type::Tiny works better with Moose than the Moose stuff too
17:42 stephan48 in a delay callback i would like to have the request response and some custom meta info for the request needed for further processing. how could i archive that? (is there a more elegant way than calling begin & callback once for the "payload" and once begin for the useragent callback and then splicing two values each time)
17:43 trone joined #mojo
17:44 trone joined #mojo
17:52 bd mst: Maybe now we won't need to have separate MooseX, MouseX and MooX versions of everything? We can but hope...
17:52 bd mst: i need to look at this, thx
17:53 mst bd: often the MooX versions work with Moose as well
17:53 mst bd: Mouse isn't compatible with anything really, although you can slurp it via Moo
17:53 mst MooRole consumes MouseRole, then Moose can use the MooRole
17:54 amon joined #mojo
17:57 hernan605 hey
17:57 hernan605 does Mojo::Dom understand nth-child(2) ?
17:59 go|dfish hernan605: yes
18:00 hernan605 yeah
18:00 hernan605 i needed ->parent
18:11 Grinnz_ stephan48: i'm not sure i follow your question, but perhaps you are looking for $delay->data ?
18:14 stephan48 i am already using $delay->data. i need to lookup data for specific requests made via Mojo::UserAgent
18:15 Grinnz_ stephan48: ah. yeah it's not quite elegant, but for that i keep an arrayref of each request metadata, in the same order begin is called (so the same order you get them in the next step)
18:16 stephan48 ahm. thanks
18:16 jontaylor joined #mojo
18:16 Grinnz_ stephan48: the other way is i think what you said, inserting the metadata in between each response with ->pass
18:16 stephan48 that makes way to much sense... i only thought about using a hash in $delay->data
18:17 stephan48 thanks!
18:21 dod joined #mojo
18:26 dod joined #mojo
19:29 gryphon joined #mojo
19:33 trone_ joined #mojo
19:56 Grinnz_ Invalid URI in request GET ././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././../../../../../../../../ HTTP/1.1
19:56 Grinnz_ stay classy, bots
19:57 mst Grinnz++
20:22 meshl joined #mojo
20:30 trone_ joined #mojo
20:31 disputin joined #mojo
20:42 mattastrophe joined #mojo
21:25 melo joined #mojo
21:47 melch joined #mojo
21:47 mattastrophe joined #mojo
21:56 PryMar56 joined #mojo
21:57 jberger kmx ping
21:58 jberger oh nm, I see that #win32 was informed that strawberryperl site is down
21:58 jberger that's the better place for it anyway
22:35 jb360 joined #mojo
22:48 mattastrophe joined #mojo
23:19 Grinnz how to set it up so i can look up a mysql table entry by an arbitrary set of attributes in a json object... mysql problems :
23:19 Grinnz :/
23:20 Grinnz i guess i could make a string with sort keys, or something

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