Camelia, the Perl 6 bug

IRC log for #mojo, 2012-04-03

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

All times shown according to UTC.

Time Nick Message
00:03 hide Is there a way to set the layout based on the mode Mojolicious is running in? minimal for testing for example
00:23 tardisx left #mojo
00:24 marty hide:  This might help you.    http://search.cpan.org/~ams/Mojoli​cious-2.53/lib/Mojolicious.pm#mode
00:30 marty hide: I guess you could also test for $self->app->{mode} and set the layout stash variable based on the test.
00:31 hide thanks marty, I'll work that into the layout in the top of my template files
00:33 marty ie: % $self->stash->{layout} = 'wow' unless $self->app->{mode} eq 'develpment';
00:33 marty Ahh ok. Have fun.  :)
00:37 GitHub29 joined #mojo
00:37 GitHub29 [mojo] kraih pushed 1 new commit to master: http://git.io/gmhWTw
00:37 GitHub29 [mojo/master] documentation tweaks - Sebastian Riedel
00:37 GitHub29 left #mojo
00:38 hide marty: I cheated and renamed my minimal layout to testing
00:39 sri marty: why hash value?
00:39 sri people poking into objects always makes me cringe
00:40 hide I used: layout $self->app->mode
00:40 hide in my template
00:40 sri ->mode is officially supported, ->{mode} is not
00:45 * sri is really wondering why anyone would avoid accessors and deref the object to poke into it
00:45 sri i've seen it a lot and don't get it
00:46 sri it's bypassing lazy instantiation, so there's a lot of potential for random errors
00:46 sri not to mention the possibility of renaming, hash values are not covered by deprecation policies
00:58 sri tempire: want to upload a release that doesn't require a tweet? :)
00:58 * sri wants the logging tests in cpantersters
01:21 SmokeMachine joined #mojo
01:24 carlp joined #mojo
01:25 carlp Greetings!  Is there a way to get the host address out of a request, similar to the old HTTP_HOST CGI environment variable?
01:34 tempire fer sure
01:41 tempire uploading...
01:41 sri \o/
01:49 carlp joined #mojo
01:51 GitHub33 joined #mojo
01:51 GitHub33 [mojo] kraih pushed 1 new commit to master: http://git.io/rBMRRw
01:51 GitHub33 [mojo/master] mention which plugins are loaded automatically - Sebastian Riedel
01:51 GitHub33 left #mojo
01:52 sri tempire++
01:57 sri http://blogs.perl.org/users/brian_​d_foy/2012/03/some-perl-things-i-h​ope-the-lazy-web-does-for-me.html # hmm, he wants a credential wallet too
02:04 SmokeMachine joined #mojo
02:34 sjn joined #mojo
02:40 burk joined #mojo
02:42 xxtjaxx_ joined #mojo
02:42 bobkare joined #mojo
02:57 xaka joined #mojo
03:41 GitHub12 joined #mojo
03:41 GitHub12 [mojo] kraih pushed 1 new commit to master: http://git.io/-Vyw2Q
03:41 GitHub12 [mojo/master] added kept_alive method to Mojo::Transaction::WebSocket - Sebastian Riedel
03:41 GitHub12 left #mojo
03:56 xaka1 joined #mojo
04:15 kaare joined #mojo
05:30 Leandr joined #mojo
05:31 yko joined #mojo
05:45 jamesw joined #mojo
06:30 avkhozov joined #mojo
06:33 avkhozov left #mojo
06:34 avkhozov joined #mojo
06:53 spleenjack joined #mojo
06:56 fhelmber_ joined #mojo
07:02 taryk joined #mojo
07:17 Leandr joined #mojo
07:34 marty joined #mojo
07:40 AmeliePoulain joined #mojo
07:56 marty joined #mojo
08:01 cosmincx joined #mojo
08:03 judofyr joined #mojo
08:13 hugh joined #mojo
08:15 heytrav joined #mojo
08:17 abra joined #mojo
08:34 mire joined #mojo
08:39 heytrav joined #mojo
09:03 ispy_ joined #mojo
09:11 Leandr joined #mojo
10:11 xoma joined #mojo
11:20 arpadszasz joined #mojo
11:28 mire joined #mojo
11:31 metys joined #mojo
11:41 metys Can anyone tell me, is there any way to use Mojolicious::Plugin::TagHelpers with edit/update forms? Everything works well with create/insert forms, but when I get some "item" from DB, how to set values to form elements? It's easy for text fields, but is this possible with for example, selects/radio/checkboxes?
11:54 stephan48 <% param name   => $data->{'name'} unless defined(param 'name'); %> <- use something like this to fill params with default values
12:24 Akron joined #mojo
12:27 metys @stephen48, hmm, not so clean, but should enough for now... thx
12:41 metys quit
12:42 JerJer joined #mojo
12:50 JerJer is Mojo::EventEmitter something designed to be used out in an app?
12:53 abra joined #mojo
12:53 jnap joined #mojo
13:37 GitHub192 joined #mojo
13:37 GitHub192 [mojo] kraih pushed 2 new commits to master: http://git.io/zin4nw
13:37 GitHub192 [mojo/master] better Mojo::Log examples - Sebastian Riedel
13:37 GitHub192 [mojo/master] added test for Mojo->build_tx - Sebastian Riedel
13:37 GitHub192 left #mojo
13:48 ispy_ joined #mojo
13:52 CromeDome joined #mojo
13:54 inokenty joined #mojo
13:56 abra joined #mojo
13:58 metys joined #mojo
14:27 ispy_ joined #mojo
14:29 Leandr joined #mojo
14:38 mattastrophe joined #mojo
14:57 hide really basic question, but with the check_box TagHelper, how do I mark the checkbox as checked?
15:01 judofyr hide: checked => 'checked' ?
15:02 hide and that's what I thought, but I'm getting an Odd number of elements in anonymous hash error
15:06 GitHub155 joined #mojo
15:06 GitHub155 [mojo] kraih pushed 1 new commit to master: http://git.io/b6OQjQ
15:06 GitHub155 [mojo/master] fixed multiple progress event bugs in Mojo::Message - Sebastian Riedel
15:06 GitHub155 left #mojo
15:19 judofyr sri: https://gist.github.com/2292870
15:20 sri :)
15:21 judofyr it's actually pretty nice when you want to test sockets/fork and stuff. you never quite know how MiniTest/rspec deals with that
15:37 xenu joined #mojo
15:40 kmx sri: FYI: Net::SSLeay has NPN support (in the latest v1.46) + I have started a RT @ IO::Socket::SSL with a NPN patch
15:44 sri kmx++
15:47 Psyche^ joined #mojo
15:48 sri looks really easy to use
16:07 xaka1 joined #mojo
16:13 batman hello
16:13 batman i created a plugin https://metacpan.org/module/Mo​jolicious::Plugin::Cloudinary which can be used standalone
16:14 batman should i then rename it ti just Cloudinary and then let Mojolicious::Plugin::Cloudinary inherite from it?
16:14 batman not sure if i bother to do it...but i'm asking anyway :)
16:17 hide I think I found the problem I'm having with check_box. Trying to set the value to checked from within my controller, and the TagHelper doesn't see it as a parameter, bypassing the setting of checked
16:19 JerJer joined #mojo
16:19 batman do you use $c->param(foo => "bar") ?
16:44 hide I tried that, still didn't follow the path to setting it
16:44 jwang joined #mojo
16:48 ispy_ joined #mojo
16:57 abra joined #mojo
17:02 mercutioviz joined #mojo
17:07 GitHub196 joined #mojo
17:07 GitHub196 [mojo] kraih pushed 1 new commit to master: http://git.io/4sP8Xg
17:07 GitHub196 [mojo/master] fixed more progress event bugs - Sebastian Riedel
17:07 GitHub196 left #mojo
17:07 tempire batman: I would have the functionality in its own module, and let the plugin use it accordingly
17:08 sven^ joined #mojo
17:11 baton8 joined #mojo
17:18 GitHub191 joined #mojo
17:18 GitHub191 [mojo] kraih pushed 1 new commit to master: http://git.io/HOp8dw
17:18 GitHub191 [mojo/master] better progress event examples - Sebastian Riedel
17:18 GitHub191 left #mojo
17:21 sri hmm, i'm still not sure how spdy would fit in
17:31 GitHub9 joined #mojo
17:31 GitHub9 [mojo] kraih pushed 1 new commit to master: http://git.io/uDgqzQ
17:31 GitHub9 [mojo/master] more progress and finish event tests - Sebastian Riedel
17:31 GitHub9 left #mojo
17:32 jnap joined #mojo
17:32 JerJer does it make any sense for my own application to use Mojo::EventEmitter as a base class for a 'model' that I want to stream events from ?
17:32 JerJer ala ajax / eventsource
17:35 avkhozov joined #mojo
17:36 marty sri: thanks for the pointers on $self->app->mode versus $self->app->{mode}.  I'll never poke into the hash again and always use the accessor. :)
17:40 rwstauner joined #mojo
17:41 yko joined #mojo
17:41 sri marty++
17:44 sri think i would like something along the lines of Mojo::Transport::HTTP and Mojo::Transport::SPDY
17:44 sri and have those abstract away all the protocol specific bits from Mojo::UserAgent/Mojo::Server::Daemon
17:47 sri not sure yet how Mojo::Transaction fit in there though, since a SPDY connection would also generate Mojo::Transaction::HTTP objects
17:51 eventi joined #mojo
17:54 batman tempire: that was what i suspected :)
17:55 xenu left #mojo
18:10 yko joined #mojo
18:16 Leandr joined #mojo
18:23 avkhozov joined #mojo
18:33 beyondcreed joined #mojo
18:33 mire joined #mojo
18:38 arpadszasz joined #mojo
18:45 mike_ joined #mojo
18:51 Rhaen hello world, btw
19:21 mercutioviz joined #mojo
19:28 mire joined #mojo
20:02 jnap_ joined #mojo
20:05 GitHub165 joined #mojo
20:05 GitHub165 [mojo] kraih pushed 1 new commit to master: http://git.io/3MdrhQ
20:05 GitHub165 [mojo/master] more Mojo::Content tests - Sebastian Riedel
20:05 GitHub165 left #mojo
20:06 sri hmm, getting mojolicious below 10k lines of code seems actually realistic now :o
20:09 lbr perl -pi -e 's/^([^#]+)\n/$1/'
20:09 lbr happily ignoring pod and heredocs since 22:09
20:10 sri ;p
20:10 sri if removing a line makes code look worse i don't do it
20:11 lbr "readability" is the art
20:11 inokenty Beautiful code works better
20:12 lbr anyone can write code for a computer
20:13 sri ugly code is often better, like implicit return values being faster
20:13 sri (for the computer)
20:13 lbr implicit return values are faster?
20:13 * sri nods
20:13 lbr weird
20:14 dch joined #mojo
20:14 sri think it was about scalar/list context or so
20:15 sri Mojo::Base still generates code with implicit return values because it was like 3% faster
20:15 dch I'm trying to send a JSON response to Content-Type:application/json, but only receive 204 in response. I've trimmed it down to this snippet, can anybody advise what I missed? thanks http://friendpaste.com/wT3GQnICgcWVV4XGtiIB2
20:17 hide does this make sense: https://gist.github.com/3a1e5549e1c7f80dcdfa marked with <---- Change here
20:32 perlite_ joined #mojo
20:54 kaare joined #mojo
20:57 ndiewald joined #mojo
21:01 heytrav joined #mojo
21:01 heytrav joined #mojo
21:05 jnap joined #mojo
21:18 xaka1 joined #mojo
21:23 mercutioviz joined #mojo
21:33 tempire dch: content-type doesn't do what you think it does.  Try the accept header.  Or just use ->render_json
21:34 dch tempire: thanks, I'll try to use render_json instead . the client side is dictating content-type so I have little choice there.
21:35 tempire hide: shnikies that's a huge controller action!
21:35 hide actually, that's the code from Mojolicious::Plugin:TagHelpers
21:36 hide @p was only being set by param before, now it works with param or stash, so I can set a checkbox to checked from my controller
21:37 GitHub5 joined #mojo
21:37 GitHub5 [mojo] kraih pushed 1 new commit to master: http://git.io/j0WtHA
21:37 GitHub5 [mojo/master] fixed multiple small bugs in Mojo::UserAgent::Transactor->form - Sebastian Riedel
21:37 GitHub5 left #mojo
21:38 hide but I don't know if that's right, I've worked my way through it with the say statements, and my application
21:39 hide using ->param() the value is never set, using ->stash, the value is available but doesn't make it through the if(@p ... statement
21:41 GitHub162 joined #mojo
21:41 GitHub162 [mojo] kraih pushed 1 new commit to master: http://git.io/68Ot_g
21:41 GitHub162 [mojo/master] added missing form examples - Sebastian Riedel
21:41 GitHub162 left #mojo
21:42 lukep joined #mojo
21:43 GitHub23 joined #mojo
21:43 GitHub23 [mojo] kraih pushed 1 new commit to master: http://git.io/FsMpzg
21:43 GitHub23 [mojo/master] added another Mojo::UserAgent::Transactor test - Sebastian Riedel
21:43 GitHub23 left #mojo
22:14 mattp joined #mojo
22:30 GitHub138 joined #mojo
22:30 GitHub138 [mojo] kraih pushed 1 new commit to master: http://git.io/0kpBSQ
22:30 GitHub138 [mojo/master] small optimizations - Sebastian Riedel
22:30 GitHub138 left #mojo
22:35 mattp joined #mojo
22:39 GitHub87 joined #mojo
22:39 GitHub87 [mojo] kraih pushed 1 new commit to master: http://git.io/y4ZfWQ
22:39 GitHub87 [mojo/master] more form examples - Sebastian Riedel
22:39 GitHub87 left #mojo
22:40 mattp joined #mojo
22:42 zivester joined #mojo
22:46 zivester joined #mojo
22:50 tempire is yapc registration covered for speakers?
22:50 tempire I think I asked this last year, but I don't remember.
22:54 jamesw joined #mojo
23:37 mire joined #mojo
23:45 SmokeMachine joined #mojo
23:59 JerJer1 joined #mojo
23:59 mire joined #mojo

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