Camelia, the Perl 6 bug

IRC log for #mojo, 2011-04-04

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

All times shown according to UTC.

Time Nick Message
00:14 perlrocks Twitter: "wish i  had this back when i had to do a ton of web scraping! http://bit.ly/haJlty #mojolicious" --schelcj http://twitter.com/schelcj​/status/54698363333001216
01:59 MisterHatt hmm, I have a waypoint route with /:action as the final part of the map, but I'd like to make sure action is one of a list, however action => qw/listitem1 listitem2 listitem3/ doesnt work as intended, onyl the first entry is used, anyone able to shed some light?
03:15 sri MisterHatt: where in the documentation did you see that?
03:19 MisterHatt I didnt, it's something dumb that I tried to do myself and obv doesn't work
03:21 sri "doesnt work as intended" is a bit misleading then
03:22 sri anyway, http://mojolicio.us/perldoc?Mojolicious/Gu​ides/Routing#More_Restrictive_Placeholders
03:23 yakudzo Hello ppl. I want to store some data for the template but than continue to work with template. If I write $self->render (some_var => some_data) template continues to work but no data will be stored to session. So how do I pass some data to template but can continue to work in controller ?
03:24 yakudzo oops sory have a typo
03:24 MisterHatt right, thanks sri
03:25 sri yakudzo: i don't understand the question
03:25 yakudzo I want to store some data for the template but than continue to work with controller. If I write $self->render (some_var => some_data) controller continues to work but no data will be stored to $self->session for example. So how do I pass some data to template but than continue to work in controller ?
03:26 sri why don't you put the data into the session?
03:27 yakudzo sri, but after template renders and shows to the user I not need this data any more... leme show example to be more clear
03:28 sri then why not just use the stash?
03:28 sri in fact, the data should be in the stash
03:29 yakudzo http://pastebin.com/1y46zNcA
03:30 yakudzo sri, in the next request stash data will be removed?
03:30 * sri doesn't follow
03:31 sri don't think i can help you, all i see is a lot of contradicting information :/
03:34 yakudzo I will use stash for template data. I think it should help me (: lots of contradictions is because of my language problem I think (:
03:37 sri http://mojolicio.us/perldoc?Mojolicious/Lite#Stash # this rather new recipe should make usage obvious i think
04:34 mohan left #mojo
04:34 mohan joined #mojo
05:14 koban joined #mojo
05:27 ysyrota joined #mojo
05:27 kaare joined #mojo
05:35 sherr joined #mojo
05:38 sherr left #mojo
05:41 sherr joined #mojo
06:04 sri oh my....
06:04 sri now there are voip people delaying the websocket spec
06:04 sri http://www.ietf.org/mail-archive​/web/hybi/current/maillist.html
06:37 sherr left #mojo
06:41 sherr joined #mojo
06:47 AmeliePoulain joined #mojo
06:48 Christian joined #mojo
06:49 Christian mornign
06:50 * sri waves
06:51 bosphorus joined #mojo
06:55 Christian left #mojo
07:00 sherr_ joined #mojo
07:01 shurex1 joined #mojo
07:01 sherr left #mojo
07:01 sherr_ left #mojo
07:09 shurex1 left #mojo
07:09 sherr joined #mojo
07:12 Foxcool joined #mojo
07:14 shurex joined #mojo
07:18 shurex1 joined #mojo
07:21 shurex left #mojo
07:22 ysyrota How to manipulate with HTTP headers from Mojo::Lite application?
07:25 fhelmber_ joined #mojo
07:25 shurex joined #mojo
07:26 shurex1 left #mojo
07:29 yko ysyrota: $self->res->headers == http://mojolicio.us/perldoc?Mojo/Headers
07:31 yko and same with req, because both inherit from Mojo::Message
07:32 ysyrota yko: thanks!
07:32 yko np
07:33 ysyrota yko: Mojo sets Last-Modified header to current timestamp for static content, seems like a bug
07:35 yko hmm. i believe it's desired behavior (forced refresh).
07:35 yko not sure though, maybe you'd better ask sri or open issue on github?
07:39 cosmincx joined #mojo
07:41 shurex1 joined #mojo
07:43 ysyrota yko: static content is intended to be static, so refresh isn't needed
07:45 yko dunno, i'm too weak now to make any decisions. but i'm mostly agree
07:45 yko feel free to lobby that changes or even write a patch
07:46 shurex left #mojo
07:47 yko afaik static stuff is mostly for testing
07:47 yko you supposed to render real scope of static files by something like nginx or apache so nobody does real care about Static.pm
07:48 yko i think sri's answer will be something like 'patches welcome' :D
07:49 sri patches welcome
07:49 purl patches welcome is always true or unless for search.cpan.org or swahili for "Put up or shut up."
07:49 Foxcool left #mojo
07:49 sri ysyrota: did you actually check that there's a bug?
07:50 sri the static dispatcher will do a stat check to get the mtime
07:50 sri so i kinda doubt it
07:50 ysyrota sri: I checked it on older version, should re-check on current before bug you
07:50 sri right, never report a bug for an old version
07:51 ysyrota sri: I know :)
07:51 yko better even don't try to investigate bugs on older version :) you'll save your time
08:00 Foxcool joined #mojo
08:12 Foxcool left #mojo
08:21 sri ysyrota: ok, i even tested it now, Last-Modified works flawless
08:22 yko :)
08:23 sri btw. there is a recipe for headers now too
08:23 sri http://mojolicio.us/perldoc?Mojolicious/Lite#HTTP
08:24 Foxcool joined #mojo
08:24 cosmincx left #mojo
08:37 ysyrota sri: great!
08:38 cosmincx joined #mojo
08:38 ysyrota I read that google ignores Last-Modified header if it set to current timestamp, so I want to set it to start of the day on my almost static site
08:39 moritz why not to the last modification date?
08:40 sri what moritz said
08:52 shurex1 left #mojo
09:15 spleenjack joined #mojo
09:19 shurex joined #mojo
09:23 cosmincx left #mojo
09:23 cosmincx joined #mojo
09:23 GitHub119 joined #mojo
09:23 GitHub119 mojo: master Sebastian Riedel * e8e3df1 (1 files in 1 dirs): cleanup - http://bit.ly/hQopOL
09:23 GitHub119 left #mojo
09:29 fmerges joined #mojo
09:30 shurex left #mojo
09:34 shurex joined #mojo
09:44 ispy_ left #mojo
10:09 Christian joined #mojo
10:34 oleber joined #mojo
10:34 oleber Hi all
10:34 * sri waves
10:53 oleber I need to test something with Test::Mojo that uses Basic Authentication. How do I pass the login/password to Test::Mojo?
10:53 oleber thanks for any help
10:55 yko oleber: should be something like get_ok('http://user:password@localhost:' . $port . '/path')
10:56 yko maybe even get_ok('http://user:password@/url') would work, but i'm not sure, feel free to try
10:58 sri get_ok("http://user:password@localhost:$port/path")
10:58 Alias left #mojo
10:59 yko I think other way may be get_ok(Mojo::URL->new('/path'​)->userinfo('user:password'))
10:59 yko not sure again though :)
10:59 sri it is, but looks worse
10:59 oleber Let me try
10:59 yko i think your version will cause error :p
11:00 sri my $port = $t->ua->test_server; # btw
11:01 yko sri++
11:04 oleber did I learned something new ;)
11:04 oleber Mojo::URL->new('/backend/auth/order/abcdef​ghil/status')->userinfo('user:password'),
11:05 sri i doubt that results in a valid url
11:05 sri considering userinfo is part of the authority
11:06 oleber sory, this works
11:06 oleber my $test = Test::Mojo->new( 'app' => 'XPTO::MyMojoliciousApp' );
11:06 oleber $test->get_ok(Mojo::URL->new('/backend/auth/order​/abcdefghil/status')->userinfo('user:password'), { 'content-type' => 'application/json' }, '{"authentication" : { "login" : "test_login", "password" : "test_password" }}');
11:06 sri Oo
11:06 oleber but this don't:
11:06 oleber my $test = Test::Mojo->new( 'app' => 'XPTO::MyMojoliciousApp' );
11:06 oleber $test->get_ok(Mojo::URL->new('http://localhost/backend/aut​h/order/abcdefghil/status')->userinfo('user:password'), { 'content-type' => 'application/json' }, '{"authentication" : { "login" : "test_login", "password" : "test_password" }}');
11:06 yko щгср
11:06 sri no pasting please
11:06 yko ouch. that was much
11:07 yko oleber: in second version you need to provide valid port
11:07 yko as sri told you
11:07 sri first version actually shouldn't work either
11:07 sri it depends on a glitch
11:08 oleber if I set http://localhost, he really does the call ???
11:08 sri you need localhost:$port
11:08 sri like i showed above
11:09 yko ->new("/path")->userinfo("user:password") should provide ua enough info when running tests. just the same as it was get_ok('/foo') but it's only my opinion
11:09 sri yko: but the url is invalid
11:10 * yko sighs
11:10 oleber my question now is different, is there a real connection if I set a http://...
11:10 sri you depend on the fact that the useragent currently doesn't check the whole authority, only the host part
11:10 sri oleber: there is *always* a real connection
11:11 yko even Mojo::URL->new("http://user:password\@/path") works atm, but i'm sure youll brake it soon now :)
11:12 yko just because it looks bad
11:12 sri yko: not unlikely, since it is invalid
11:13 oleber so it is strange that it works without the http, but fails with it
11:13 sri if someone ever files a bug against Mojo::URL->is_abs it will break
11:13 sri oleber: you might want to read everything above again
11:14 sri if the url is relative the useragent will fill out the blanks
11:14 yko damn, need again go to dentist again. welcome hell of pain :'(
11:14 sri if it is absolute you are supposed to do it
11:14 sri yko: :S
11:15 yko i'm going there like i'm working at stomatology last month. hate all that
11:15 yko see ya
11:15 sri there is always an http server running for Test::Mojo tests
11:16 * sri waves
11:43 Foxcool left #mojo
11:49 fhelmber_ left #mojo
11:52 fhelmber_ joined #mojo
11:53 Foxcool joined #mojo
11:54 shurex left #mojo
11:58 perlrocks Twitter: "Mojolicious-Plugin 1.0 for HamlRenderer MRAMBERG - http://frepan.org/ ~ mramberg/Mojolicious-Plugin-HamlRenderer-1.0 /" (af) --cpan_new http://twitter.com/cpan_ne​w/status/54875496076410880
12:06 shurex joined #mojo
12:14 shurex left #mojo
12:24 sri http://www.imdb.com/title/tt1640459/ # wow, this looks kind of epic
12:30 Alias joined #mojo
12:32 marcus added to couch potato
12:33 ysyrota left #mojo
12:33 ysyrota joined #mojo
12:34 Alias_ left #mojo
12:36 Alias_ joined #mojo
12:39 Alias left #mojo
12:44 chansen_ joined #mojo
12:44 chansen left #mojo
12:48 chansen_ is now known as chansen
12:49 spleenjack left #mojo
12:50 spleenjack joined #mojo
12:54 Foxcool left #mojo
12:56 sherr left #mojo
13:10 bosphorus left #mojo
13:16 Foxcool joined #mojo
13:23 Foxcool left #mojo
13:25 Alias joined #mojo
13:30 mattastrophe left #mojo
13:30 kaare left #mojo
13:34 Foxcool joined #mojo
13:40 shurex joined #mojo
13:40 shurex left #mojo
13:40 Foxcool left #mojo
13:51 Foxcool joined #mojo
13:57 GitHub58 joined #mojo
13:57 GitHub58 mojo: master Sebastian Riedel * 5d1044a (1 files in 1 dirs): added test - http://bit.ly/er2jcB
13:57 GitHub58 left #mojo
14:03 Alias_ left #mojo
14:03 Alias_ joined #mojo
14:09 kaare joined #mojo
14:13 Foxcool left #mojo
14:13 GitHub143 joined #mojo
14:13 GitHub143 mojo: master Sebastian Riedel * 9f8a8f1 (3 files in 3 dirs): made Test::Mojo a little more user friendly - http://bit.ly/gZsNlp
14:13 GitHub143 left #mojo
14:13 marcus sri: how can I make the default mojolicious session persistent?
14:13 sri ?
14:14 marcus the signed cookie?
14:14 marcus seems the default one is dropped when you close the browser?
14:14 * sri doesn't follow
14:14 marcus sri: like '[ ] remember me§
14:14 marcus sri: like '[ ] remember me' - even
14:14 sri default expiration is 3600 seconds
14:15 marcus sri: so I need to set a new signed_cookie with longer expiration?
14:15 sri i don't know
14:15 moritz so $self->session(expire => $rediculsly_high_number) ?
14:16 marcus sri: is what moritz said the way to change the expiry?
14:16 sri one way
14:16 marcus can I do that at startup?
14:16 sri i'm sure the sessions object has attributes
14:19 marcus yeah. so $self->session->default_expiration(604800);
14:19 marcus thanks
14:22 AmeliePoulain left #mojo
14:25 kvorg joined #mojo
14:38 perlrocks Twitter: "Mojolicious:: Plugin:: CSRFDefender - search.cpan.org http://htn.to/dauCmr" (ja) --gugod http://twitter.com/gugod/status/54915685452759040
14:41 GitHub116 joined #mojo
14:41 GitHub116 mojo: master Sebastian Riedel * 2f52161 (4 files in 3 dirs): added experimental build_url method to Test::Mojo - http://bit.ly/ezfxdA
14:41 GitHub116 left #mojo
14:41 moritz is the author of "Mojolicious::Plugin::CSRFDefender in here by any chance?
14:46 koban left #mojo
14:48 marcus hmm, no that threw a warning.
14:48 marcus should be ->sessions I guess
14:50 sri didn't i add that warning because of you back then? :)
14:51 marcus it's a deprecation warning
14:52 marcus this time I guess it was actually wrong tho :)
14:52 sri i mean the hint
14:52 marcus Mojolicious->session is DEPRECATED in favor of Mojolicious->sessions!!! But you most likely meant to use Mojolicious::Controller->session anyway.
14:52 sri and yea
14:52 sri it was wrong in this case
14:54 * marcus looks for a mongodb gui tool
14:55 marcus mongohub looks like a start, but it can't create collections, it seems
15:01 sri why would you need a gui?
15:08 sri mongodb console is quite nice
15:12 cosmincx left #mojo
15:22 abra joined #mojo
15:24 sherr joined #mojo
15:25 Christian cu all
15:25 Christian left #mojo
15:30 marcus sri: because I need some noobs to edit the data.
15:31 marcus and I don't feel like writing a crud interface.
15:34 Foxcool joined #mojo
15:47 spleenjack left #mojo
15:47 spleenjack joined #mojo
15:51 fhelmbe__ joined #mojo
15:51 fhelmber_ left #mojo
15:52 charsbar0 joined #mojo
15:52 charsbar left #mojo
15:54 charsbar joined #mojo
15:54 charsbar0 left #mojo
15:54 charsbar0 joined #mojo
15:54 charsbar left #mojo
15:56 charsbar joined #mojo
15:56 charsbar0 left #mojo
15:56 charsbar0 joined #mojo
15:57 charsbar left #mojo
16:13 ysyrota left #mojo
16:30 fmerges left #mojo
16:56 xris joined #mojo
16:57 shurex1 joined #mojo
17:08 keith joined #mojo
17:09 keith left #mojo
17:09 perlrocks Twitter: "I'm furious! # Symfony2 just terrible! The authors that have not seen # ror or # mojolicious?" (ru) --mshershnev http://twitter.com/mshershn​ev/status/54953828977606656
17:13 kvorg left #mojo
17:19 sherr left #mojo
17:51 spleenjack left #mojo
17:58 sherr joined #mojo
18:06 perlrocks Twitter: "#perl #mojowka not_found handling was brokn when releasd #Mojolicious 1.1 (thx @kraih). But now fixd & pushed to #github http://is.gd/gN2cYd" --shoorick77 http://twitter.com/shoorick​77/status/54968210910482433
18:35 perlrocks Twitter: "@ KELiON, after # mojolicious look ugly these controllers http://goo.gl/xdGZI" (ru) --mshershnev http://twitter.com/mshershn​ev/status/54975487071633408
19:01 fhelmbe__ left #mojo
19:02 dekimsey left #mojo
19:10 mattastrophe joined #mojo
19:19 shurex1 left #mojo
19:25 Foxcool left #mojo
19:56 marty joined #mojo
20:07 mattastrophe left #mojo
20:14 dekimsey joined #mojo
20:34 stephen left #mojo
20:36 stephen joined #mojo
20:41 moritz I've skimmed over the Mojo::UserAgent docs, and it's not quite clear to me how I'd do an async request
20:41 moritz anyone care to explain?
20:51 kaare left #mojo
20:55 perlrocks Twitter: "#perl #mojowka repaired and can work with #mojolicious 1.15 and serve #images. Same note in Russian: http://j.mp/hrH3v6" --shoorick77 http://twitter.com/shoorick​77/status/55010516392882176
21:06 arpadszasz joined #mojo
21:56 perlite left #mojo
21:58 perlite joined #mojo
23:16 arpadszasz left #mojo
23:19 vel joined #mojo
23:23 vel left #mojo

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