Camelia, the Perl 6 bug

IRC log for #mojo, 2012-03-25

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

All times shown according to UTC.

Time Nick Message
00:05 GitHub197 joined #mojo
00:05 GitHub197 [mojo] kraih pushed 1 new commit to master: http://git.io/Cr-V_Q
00:05 GitHub197 [mojo/master] more detailed delay examples - Sebastian Riedel
00:05 GitHub197 left #mojo
00:12 hide What happened to the Mojolicious::Routes::Route->add_shortcut() method? Tried searching through Changes and didn't see it listed.
00:13 sri that method never existed
00:13 sri you prolly mean Mojolicious::Routes->add_shortcut
00:15 hide that could be, and the return from  $route->bridge->to() has changed
00:15 sri not really
00:16 sri Routes and Route has just been split
00:16 sri since people kept mixing up which methods were tied to the root and which were available on nodes
00:17 sri ->namespace() being the worst offender
00:19 inokenty I don't like an empty parentheses after method's name. It looks like PHP =)
00:19 hide oh ok, thanks, I need to figure out how to change this code then :)
00:20 sri hide: chances are you just found a bug in your code :)
00:21 hide well, it's crab's code. I've been using his Gadwall as an example, and he uses it in his login plugin - https://github.com/amenonsen/Gadwall/blo​b/master/lib/Mojolicious/Plugin/Login.pm
00:21 sri add_shortcuts on nodes for example was extremely fragile and had many side effects
00:21 sri oh
00:21 sri shame on crab!
00:22 sri that should be $r->add_shortcut
00:22 hide so now I'm trying to figure out why my tests are all sudden failing after upgrading.
00:23 hide sri: thanks again, I'll give that a go.
00:23 sri please send a pull request to crab
00:24 hide I will
00:29 GitHub145 joined #mojo
00:29 GitHub145 [mojo] kraih pushed 1 new commit to master: http://git.io/bL5FjA
00:29 GitHub145 [mojo/master] answer new feature FAQ - Sebastian Riedel
00:29 GitHub145 left #mojo
00:29 sri hide++
00:37 jamesw joined #mojo
01:28 inokenty sri: I have a trouble http://pastebin.com/n1TiV0Pg
01:28 inokenty I use Apache mod_proxy
01:29 inokenty And $self->req->url->base is different in morbo and hypnotoad
02:05 stephan48 in a plugin is there a way to fetch the base uri?
02:25 Mrono how do I do $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = "0"; in mojo useragent
02:26 inokenty Mrono: BEGIN { $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0 }
02:26 inokenty Try this
02:26 inokenty Oh, this isn't MOJO env var
02:26 inokenty Forget my post )
02:26 purl inokenty, I didn't have anything matching my post )
02:28 Mrono unfortunately so
02:28 purl well, unfortunately so is his keyboard
03:04 Psyche^ joined #mojo
03:30 tempire Mrono: what problem are you having?
03:31 tempire not sure why you would need that.
04:04 sri tempire: perhaps we should consider actually doing host verification if ->ca is activated in the user agent
04:08 sri i don't care particularly, but not doing it might come back to bite us at some point in the future
04:08 inokenty sri: Hi, did you see my issue above?
04:09 tempire I'm all for it.  I don't want to put the effort into it at the moment, though.
04:09 sri same, i just want to go to sleep now :)
04:09 * tempire serenades sri
04:10 sri so if anyone is listening... PLEASE MAKE HOST VERIFICATION WORK WHILE I'M ASLEEP!!! KTHX!!!
04:54 * tempire broils a tri-tip roast
05:14 inokenty I found the solution
05:17 inokenty http://pastebin.com/rNFwizjz
05:19 inokenty But I not quite sure this is the right decision
05:30 Mrono tempire: I have that issue when I have to use https but there's either no SSL cert of it's self signed
05:30 Mrono our internal systems at work don't always have SSL certs
05:48 tempire uh
05:48 tempire how are you using ssl without a cert?
05:49 tempire oh, you probably mean no client cert.
05:50 tempire You can add the ca that generated the server certs to the openssl config on the machine you're making a call from.
05:51 tempire I don't think there's a way to explicitly disable the verification at the moment.
05:52 Mrono ugh
05:53 Mrono I use that contantly with my UA calls
05:55 Foxcool joined #mojo
07:07 kaare joined #mojo
07:35 mire_ joined #mojo
07:50 mire_ joined #mojo
08:01 binaryking joined #mojo
08:01 binaryking tempire: https://github.com/tempire/MojoExample
08:02 binaryking how does it work?
08:02 purl how does it work is http://www.howstuffworks.com
08:02 binaryking i mean do i have to upload all the files to heroku to run it as a website
08:21 tempire You don't have to use Heroku at all.  The instructions are under "Usage"
08:27 binaryking tempire: but you've uploaded the app on heroku for a live example.
08:27 binaryking how did u do that?
08:29 tempire Are you interested in running mojoexample, or in using Heroku?
08:30 binaryking actually, i too wanna make a website like you've made using mojoexample, and with the help of the code of MojoExample
08:30 binaryking and for that i need to know how to exactly upload it to Heroku..... :)
08:31 tempire https://github.com/judofyr/perloku
08:31 tempire But to be clear, you don't need Heroku to run a mojo app.
08:32 binaryking so is uploading to heroku is always the same
08:32 binaryking so what is the other method.?
08:39 binaryking tempire: how do i specify my custom message for 404 not found?
08:42 tempire Use Morbo.  Or hypnotoad.  The instructions are under usage on github.
08:42 tempire Your other question is answered in the guides.
08:43 tempire Probably the rendering guide.
08:43 binaryking ok.........thanks :)
09:05 Foxcool joined #mojo
11:08 black joined #mojo
11:20 black joined #mojo
11:29 abra joined #mojo
11:36 * sri yawns
11:43 stephan48 i got a plugin in which i need to know the base url for an app, what would be the easiest way to get it?
11:44 stephan48 i mean the schema://host:port/basepath/
11:45 stephan48 when i am in a request i can get it via $c(the controller)->url->base
11:45 stephan48 but in a helper?
11:46 tabbi joined #mojo
11:47 dryman left #mojo
11:47 tabbi left #mojo
11:51 GitHub40 joined #mojo
11:51 GitHub40 [mojo] kraih pushed 1 new commit to master: http://git.io/G3pk9w
11:51 GitHub40 [mojo/master] fixed small bug where Hypnotoad would ignore the MOJO_REVERSE_PROXY environment variable - Sebastian Riedel
11:51 GitHub40 left #mojo
11:51 sri inokenty: should be fixed
11:55 stephan48 sri: any idea to my problem?
11:58 inokenty joined #mojo
12:06 GitHub100 joined #mojo
12:06 GitHub100 [mojo] kraih pushed 1 new commit to master: http://git.io/GgerFw
12:06 GitHub100 [mojo/master] small Hypnotoad documentation tweaks - Sebastian Riedel
12:06 GitHub100 left #mojo
12:08 inokenty sri: Thanx
12:09 sri stephan48: you can't
12:30 stephan48 sri: bad
12:30 stephan48 so i would have to tell the plugin its own path?
12:30 sri stephan48: no, it's only logical
12:30 stephan48 sure :)
12:30 stephan48 but for my need it scusk
12:30 stephan48 sucks*
12:31 sri think about it, how is the server supposed to know all the domains assigned to it?
12:31 stephan48 true
12:31 sri how would it know about reverse proxies before receiving a request?
12:32 stephan48 ye
12:57 mire_ joined #mojo
13:28 taryk joined #mojo
13:37 Mrono How do I do realm authentication with UA
13:37 Mrono for things like https://demo3.switchvox.com/json
13:48 sri tempire: what's the best way for me to test hostname verification?
13:49 sri generate certs for 127.0.0.1?
13:54 sri actually, just ignore me, i really don't want to work on that :)
14:00 sri but i'm still a little worried about it
14:00 Mrono why
14:00 Mrono far as I can tell the UA in mojo ignores certs atm
14:01 sri not if you enable a ca cert
14:01 Mrono ah
14:01 sri in which case it's rather unfortunate that we don't actually check the hostname
14:02 sri ignoring certs by default is not a big deal, but if you intentionally enable a ca cert i think you would expect a little security
14:03 sri on the other hand, we make no promises other than to check the ca cert
14:03 cstamas sri: you can create a fake hostname adding entries to /etc/hosts
14:03 sri cstamas: i need a portable unit test
14:03 sri if we can't test it reliably it's surely not a security feature
14:04 sri https://github.com/kraih/mojo/b​lob/master/t/mojo/ioloop_tls.t
14:05 sri we do have very good tests for current functionality, but my openssl fu is too weak to add a sane hostname verification case
14:05 taryk joined #mojo
14:06 cstamas then what you said "generate certs for 127.0.0.1" can work
14:06 sri the actual verification is as easy as IO::Socket::SSL::set_ctx_de​faults(SSL_verifycn_scheme => 'http', SSL_verifycn_name => 'google.com')
14:07 sri well, i tried 127.0.0.1 certs but couldn't get it to work :(
14:09 cstamas can you connect to arbitrary port then later tell openssl what cert name you expect there?
14:13 stephan48 any hint where i can find docu about embedding templates in plugins?
14:22 GitHub55 joined #mojo
14:22 GitHub55 [mojo] kraih pushed 1 new commit to master: http://git.io/8EYB6g
14:22 GitHub55 [mojo/master] added example for bundling assets in the DATA section of a plugin - Sebastian Riedel
14:22 GitHub55 left #mojo
14:22 sri stephan48: that should answer the question
14:23 mire_ joined #mojo
14:23 Mrono sri: why are there so few actual full built examples on the wiki
14:23 Mrono like here is how you build a tranaction manually and make a call
14:24 stephan48 cool thanks sri!
14:24 Mrono it's all specific things like a streaming response
14:24 sri cstamas: no clue
14:26 sri Mrono: the wiki is made by user for users, so prolly because you didn't add them
14:27 Mrono sri: sorry, mixed up my words, I meant the perldocs
14:29 sri the primary focus of the core documentation is to explain core features, not to teach web development
14:30 Mrono I'm not looking to learn web development from it, just how to use it
14:31 Mrono the example in the synopsis at the beg of UA::Transactor doesn't work
14:33 sri works perfectly as far as i can see
14:33 Mrono I'm dumping $tx and getting no page content from it
14:34 sri i'm not very good at helping, therefore i'll step back now and let the more qualified people take over
14:35 Mrono Do you know how to build a transactor request to pass json in the body and authentication in the headers?
14:53 Mrono sri: Do you know how to build a transactor request to pass json in the body and authentication in the headers?
14:53 Mrono I just want to see how you would do it if you had to
15:11 mojobot7992 joined #mojo
15:12 mojobot6640 joined #mojo
15:16 Mrono How can I pass straight header authentication for digest authentication with mojolicious
15:17 sri Mrono: cross posting between channels is generally considered rude behavior, and will get you ignored pretty quickly i'm afraid
15:17 Mrono sri: it's on two different networks
15:18 sri that doesn't change a thing
15:18 Mrono then how about giving me a hand
15:18 Mrono since the perldoc doesn't go over this
15:24 Mrono sorry, not trying to be rude just really frusterated
15:49 GitHub9 joined #mojo
15:49 GitHub9 [mojo] kraih pushed 1 new commit to master: http://git.io/5AY_eQ
15:49 GitHub9 [mojo/master] show a few more argument variations in Mojo::UserAgent examples - Sebastian Riedel
15:49 GitHub9 left #mojo
15:51 Psyche^ joined #mojo
15:51 asarch joined #mojo
15:52 MichaelRpdx joined #mojo
16:04 Mrono sri: what is the {Accept => '*/*'} in the UA examples?
16:04 abra joined #mojo
16:10 mire_ joined #mojo
16:14 michale joined #mojo
16:22 Patterner joined #mojo
16:39 batman joined #mojo
16:47 GitHub171 joined #mojo
16:47 GitHub171 [mojo] kraih pushed 1 new commit to master: http://git.io/REq-vA
16:47 GitHub171 [mojo/master] use DNT header instead of Accept for examples - Sebastian Riedel
16:47 GitHub171 left #mojo
16:47 Mrono sri: what is the {Accept => '*/*'} in the UA examples?
16:47 Mrono oops
16:48 sri Mrono: and please don't highlight me unless it's really important
17:13 jamesw joined #mojo
17:15 GitHub109 joined #mojo
17:15 GitHub109 [mojo] kraih pushed 1 new commit to master: http://git.io/lEuHKQ
17:15 GitHub109 [mojo/master] mix URLs with and without scheme in examples - Sebastian Riedel
17:15 GitHub109 left #mojo
17:26 MichaelRpdx joined #mojo
18:29 Andrei666 joined #mojo
18:30 Andrei666 hey guys
18:30 Andrei666 how can I call from inside a controller/action, another action from another controller
18:30 Andrei666 ?
18:39 Psyche^ joined #mojo
18:42 Andrei666 joined #mojo
19:08 BlueT_ Andrei666: I asked the same question a while ago
19:09 BlueT_ Andrei666: the answer is that you should write a Model/Module with those common functions, and call it inside your Controllers
19:12 Andrei666 BlueT_ something like inheritance?
19:16 BlueT_ Andrei666: use MyModule::Model; and in controller you use $c->render( MyModule::Model->do_something( $c->req->params ) );
19:17 BlueT_ Andrei666: something like that I think.
19:21 Andrei666 oh..ok
19:21 Andrei666 i'll try that
19:21 Andrei666 seems ok :)
19:21 Andrei666 i'll see if it's what I want :)
19:39 Andrei666 and another one
19:40 Andrei666 what does this mean?
19:40 Andrei666 Not enough arguments for scalar at template "home/search.html.ep" line 6
19:40 Andrei666 ?
19:40 Andrei666 the line is
19:40 Andrei666 %= if (defined $name){
19:50 stephan48 DNT header?
19:50 stephan48 do not track?
20:03 marcus Andrei666: you could also add a helper.
20:03 marcus Andrei666: with regards to your second question, if you're not printing the result of your function, you should start your line % instead of %=
20:06 Andrei666 thanks marcus
20:06 Andrei666 i'll try that :)
20:08 Andrei666 but for the moment I'm concentrating on something else...trying to link 2 different tables with another one that containts the ids from the other 2, using Class::DBI
20:08 Andrei666 something like, having a table with movies, another one with genres... and another one that links them
20:08 Andrei666 and when I search for a genre, i should see the movies with that particular genre...
20:09 Andrei666 I'm trying to emulate a small imdb
20:09 Andrei666 using mojolicious :)
20:16 Mrono Andrei666: wouldn't it be easier to have one table with the genre listed under the movie name
20:16 Mrono then just do sql calls to get everything for that type
20:17 Andrei666 well the genre was only an example
20:17 Mrono ahh
20:17 Andrei666 try to replace genre with actors
20:17 Andrei666 and it's the same thing..
20:18 Andrei666 it would a lot harder to have a column it actors for each movie, imagine writing lots of the same actors in different movies...
20:18 Andrei666 and it will also be harder to search in those columns
20:19 Andrei666 the solution to that is to have 2 different tables, and another one thats linking them...taking only the id columns from each
20:20 Andrei666 but i'm a junior at this and i'm still learning and .... trying stuff out...
20:20 Andrei666 :)
20:20 Andrei666 it's a little hard thing to do ...for the moment :P
20:20 Andrei666 :D
20:25 MichaelRpdx joined #mojo
20:31 michale joined #mojo
20:36 MichaelRpdx joined #mojo
20:38 lukep joined #mojo
20:39 Andrei666 and another one...damn it :p
20:39 Andrei666 Global symbol "$objs" requires explicit package name at template "home/search.html.ep" line 21, near "<table border="1">".
20:39 Andrei666 and at that line
20:40 Andrei666 % } elsif (defined ($objs) )  {
20:40 Andrei666 I have a particulare case in my controller/action and don't always send %objs
20:41 Andrei666 why do I get this error if I'm using defined() function there?
20:42 marcus Andrei666: I thought class-dbi died 8 years ago
20:42 Andrei666 marcus: I guess it did....but that's a good place to start learning :)
20:43 Andrei666 DBIx::Class it might be a little harder..
20:43 Andrei666 btw: why is mojocasts down?
20:44 Andrei666 for some reason it doesn't load on my browser..
20:44 michale joined #mojo
20:45 marcus I'm thinking I should try rose for some project some time.
20:45 marcus siracusa is a smart guy.
20:46 Andrei666 Rose::DB?
20:46 purl i guess Rose::DB is actually a helper module for rdbo
20:46 Andrei666 I hear about it for the first time now....
20:46 Andrei666 didn't knew about it...
20:47 Andrei666 I'll try that also...
20:47 marcus :)
20:47 marcus at least it's maintained
20:47 Andrei666 but atm the project that I'm currently in requires Class::DBI
20:51 MichaelRpdx joined #mojo
20:54 marcus mojocasts seems down for me too btw, and tempire is offline :-/
20:56 Andrei666 i think it's down....for a few days already ...
20:56 sri WHO SHOT THE SHERIFF?
20:56 Andrei666 anyways...it'll be up
20:56 Andrei666 marcus: btw ...are you from norway?
20:58 michale joined #mojo
21:05 MichaelRpdx joined #mojo
21:10 hashBang joined #mojo
21:12 hashBang Can anyone tell me if it's possible to set the port to listen on inside a Mojolicious::Lite app?
21:13 michale joined #mojo
21:14 hashBang instead of ./myapp.pl daemon -l http://*:6190, i'd like to just be able to run ./myapp.pl daemon (or even ./myapp.pl) and the port is detected in the script
21:20 MichaelRpdx joined #mojo
21:20 jamesw http://search.cpan.org/~sri/Mojolicio​us-2.68/lib/Mojolicious/Lite.pm#Start
21:20 jamesw ?
21:21 hashBang I did see that but was confused on how to use it
21:21 hashBang $app->start('daemon', '-L http://*:6190');
21:21 hashBang would that be right?
21:22 hashBang sorry i would test but i've just closed my environment and abuout to leave work
21:22 jamesw probably 'daemon', '-L' => 'http://*:6190'
21:24 hashBang that doesn't seem to work
21:25 chansen joined #mojo
21:28 michale joined #mojo
21:31 phillipadsmith joined #mojo
21:31 jamesw works for me
21:31 jamesw paste?
21:31 purl i think paste is http://paste.scsys.co.uk/ or http://nopaste.snit.ch/Â
21:32 chansen joined #mojo
21:33 jamesw http://paste.scsys.co.uk/188780
21:35 MichaelRpdx joined #mojo
21:35 hashBang http://nopaste.snit.ch/124977
21:38 hashBang even your example runs on port 3000 for me?
21:39 hashBang acutally i can't run on any other port
21:39 hashBang even with command line launch
21:39 hashBang im just updated mojolicious now and then will try again
21:42 hashBang Could this be a Morbo bug on osx?
21:42 hashBang I've gotta go, will post something to the mailing list
21:43 michale joined #mojo
21:48 phillipadsmith joined #mojo
21:49 MichaelRpdx joined #mojo
21:58 michale joined #mojo
22:04 MichaelRpdx joined #mojo
22:12 michale joined #mojo
22:14 hashBang joined #mojo
22:16 MichaelRpdx joined #mojo
22:20 baton8 joined #mojo
22:43 chansen joined #mojo
23:35 GitHub3 joined #mojo
23:35 GitHub3 [mojo] kraih pushed 1 new commit to master: http://git.io/vY1bOQ
23:35 GitHub3 [mojo/master] changed number of redirects ojo and the get command will follow to 10 - Sebastian Riedel
23:35 GitHub3 left #mojo
23:37 chansen joined #mojo
23:43 GitHub197 joined #mojo
23:43 GitHub197 [mojo] kraih pushed 1 new commit to master: http://git.io/zqVJFQ
23:43 GitHub197 [mojo/master] mention MOJO_PROXY in ojo documentation - Sebastian Riedel
23:43 GitHub197 left #mojo
23:58 phillipadsmith joined #mojo

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