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

IRC log for #mojo, 2015-04-03

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

All times shown according to UTC.

Time Nick Message
01:14 mishantil Badgers.
01:14 purl BADGERS WELCOME.
01:14 mishantil Yay!
01:17 noganex joined #mojo
01:19 chansen joined #mojo
01:39 jberger http://www.badgerbadgerbadger.com
01:53 klapperl_ joined #mojo
01:59 hshong joined #mojo
02:15 noganex_ joined #mojo
02:17 pfc joined #mojo
03:04 Oleg joined #mojo
03:58 basic6_ joined #mojo
04:01 sh4 joined #mojo
04:02 sh4 joined #mojo
04:41 inokenty-w joined #mojo
06:12 absolut_todd joined #mojo
06:25 dotandimet joined #mojo
06:54 dod joined #mojo
06:59 dod joined #mojo
07:02 eseyman joined #mojo
07:27 trone joined #mojo
07:30 fhelmber_ joined #mojo
08:04 ver joined #mojo
08:17 Vandal joined #mojo
08:24 phillipadsmith joined #mojo
08:28 chansen joined #mojo
08:28 bjakubski joined #mojo
08:36 juikuen joined #mojo
08:58 absolut_todd joined #mojo
09:16 Dandre joined #mojo
09:45 mattastrophe joined #mojo
10:07 dotandimet joined #mojo
10:28 punter joined #mojo
11:24 KCL joined #mojo
12:08 bayashi joined #mojo
12:54 amon joined #mojo
13:09 cpan_mojo Mojolicious-Plugin-LinkEmbedder 0.23 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-LinkEmbedder-0.23
13:15 zivester joined #mojo
13:28 fhelmber_ joined #mojo
13:54 gryphon joined #mojo
14:32 zackiv31 joined #mojo
14:38 basic6 joined #mojo
14:51 GabrielVieira joined #mojo
15:02 asarch joined #mojo
15:14 sh4 joined #mojo
15:21 eseyman joined #mojo
15:23 wingfold joined #mojo
15:42 davido_ joined #mojo
16:12 disputin joined #mojo
16:56 marty neat http://sqitch.org
17:52 Oleg joined #mojo
17:53 moritz joined #mojo
17:53 moritz hi all. What's the replacement for waypoints?
17:58 sri blast from the past
18:00 sri i don't even remember what it did
18:00 genio http://www.gainesville.com/article/20150403/ARTICLES/150409846/1139?Title=Mojo-Hogtown-ready-to-fire-up-barbecue
18:00 mst moritz: if they were a router thing, maybe under?
18:03 Zoffix :D
18:11 genio does BBQ pork get served at MojoConf?
18:35 disputin joined #mojo
18:39 disputin joined #mojo
18:45 dod joined #mojo
19:06 _dave_ Given that both the stash and the 'content_for' helper both add content to rendered pages, what's the best practice on when to use which technique?
19:09 Grinnz_ just put it in a stash value if it's data from code...
19:10 davido_ joined #mojo
19:10 Grinnz_ if it's template structure, put it in the template
19:10 Grinnz_ i don't particularly understand the usecases for content_for, so i might not be the best person to ask
19:10 disputin joined #mojo
19:11 _dave_ yeah I was thinking that, but I don't know the toolkit well enough yet
19:13 _dave_ So far, this is pretty good stuff but wrapping your head around the style takes a bit of time
19:15 Grinnz_ there are a lot of pieces, the nice thing is they are usually self-contained
19:17 meredith in one of my small apps i didn't bother with an external CSS file. I just had CSS which applies to everything in the layout template, followed by %= content_for 'style', then on templates, they declare their layout then they can declare any page-specific styles with % content_for 'style' => begin ... % end, allowing them to be stuffed into the right place in the enclosing layout.
19:17 meredith it's right at the top and descriptive to me, that's my use case :)
19:37 sri yea, adding stuff to the <head> section of the layout template is the primary use case
19:38 _dave_ Is the Mojo::Loader semantics for __DATA_ available as a subclass of Mojolicious::Controller?
19:39 Grinnz_ https://metacpan.org/pod/Mojo::Loader#data_section ?
19:39 _dave_ yeah
19:39 Grinnz_ sri: ah i think i understand; so you can declare content to be somewhere, and then fill in the content differently in different templates
19:40 Grinnz_ _dave_: just use that? or am i misunderstanding the question
19:41 _dave_ I want to put __DATA__ in my controlers and be able to call data_section to get that data into variables
19:41 _dave_ *controllers
19:41 _dave_ but I'm not using "Lite"
19:43 _dave_ I guess I could force the issue by saying "use Mojo::Loader qw(data_section);"?
19:43 Grinnz_ yes, if you want to read it into a variable you can just use it directly
19:44 Grinnz_ https://metacpan.org/pod/Mojolicious::Renderer#get_data_template would be the interface to it via the renderer...
19:44 _dave_ so assuming $self is a controller I could do $self->renderer->get_data_template too
19:44 _dave_ ?
19:45 _dave_ not sure about renderer but I bet I can get to it from the app
19:56 berov joined #mojo
20:40 dotandimet joined #mojo
21:01 alnewkirk joined #mojo
21:57 zivester joined #mojo
22:16 absolut_todd joined #mojo
22:28 jberger sri: am I correct in assuming that there is a typo in this: http://mojolicio.us/perldoc/Mojolicious/Guides/Routing#Adding-conditions
22:28 jberger winner should return 1 correct?
22:29 sri jberger: yes
22:31 good_news_everyon joined #mojo
22:31 good_news_everyon [mojo] jberger pushed 1 new commit to master: http://git.io/veOly
22:31 good_news_everyon mojo/master 74ea9ad Joel Berger: fix typo in Routing Guide
22:31 good_news_everyon left #mojo
22:31 jberger think I'm about to use conditions for the first time
22:58 jberger sri: since there is the warning about not caching the conditional routes
22:58 jberger do I do better if I have conditional routes defined last?
23:24 vytas joined #mojo
23:24 KCL_ joined #mojo
23:31 zackiv31 joined #mojo
23:37 serentiy this maybe a silly question, but I am not clear on the helper specifics.  I have a hash in the "do somthing" part of my app, and I want to pass it to a helper "upsert"..
23:38 Zoffix $c->upsert( \%hash )
23:38 Zoffix Where $c is the controller
23:39 serentiy that is what I have, only my $c is $self..
23:39 serentiy helper upsert => sub   {  my $self = shift;  my %req = @_;
23:39 Zoffix Not sure. I so far played only with ::Lite :P
23:45 Zoffix What is $self? Can you pastebin some code?
23:50 Grinnz serentiy, if you pass a reference, you need to retrieve a reference; if you pass a hash bare and it gets flattened, then your my %req = @_ is correct
23:51 serentiy http://pastebin.com/iLQscxc4
23:51 Grinnz serentiy, i would suggest not dereferencing the output of json decode, and just passing the reference that way
23:52 Grinnz and then in your helper, my $req = shift; (or my ($self, $req) = @_;)
23:52 Grinnz also, %_ is not a relevant thing
23:58 serentiy if I define req as $req, how can I walk the keys of %req .. it is a hash, why would I not declare it as such?
23:59 Grinnz %$req

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