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

IRC log for #mojo, 2015-04-06

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

All times shown according to UTC.

Time Nick Message
00:08 cpan_mojo Mojo-Pg 2.05 by Sebastian Riedel - http://metacpan.org/release/SRI/Mojo-Pg-2.05
00:11 sri please don't send me pull requests with titles like "moar fixxsz"
00:20 mst right, clearly it needs to be capitalised
00:20 mst "MOAR FIXXXXSZ!!!111ONEONE"
00:32 mattastrophe joined #mojo
00:41 cpan_mojo Mojo-MySQL5 0.05 by HARRYL - http://metacpan.org/release/HARRYL/Mojo-MySQL5-0.05
00:41 cpan_mojo Mojo-mysql 0.11 by HARRYL - http://metacpan.org/release/HARRYL/Mojo-mysql-0.11
01:00 absolut_todd joined #mojo
01:03 meshl joined #mojo
01:48 klapperl joined #mojo
02:05 jberger https://twitter.com/joelaberger/status/584899621656240129
02:12 noganex_ joined #mojo
02:56 davido_ joined #mojo
02:57 Zoffix joined #mojo
02:57 zackiv31 joined #mojo
03:02 inokenty-m1 joined #mojo
03:04 asarch joined #mojo
03:04 jberger joined #mojo
03:24 harry left #mojo
03:38 inokenty-m joined #mojo
03:46 basic6 joined #mojo
03:50 zackiv31 joined #mojo
04:02 hshong joined #mojo
04:11 inokenty-w joined #mojo
04:36 Oleg joined #mojo
05:13 kaare joined #mojo
05:53 cpan_mojo Statocles 0.044 by Doug Bell - http://metacpan.org/release/PREACTION/Statocles-0.044 (depends on Mojolicious)
06:04 bramirez1 joined #mojo
06:22 bramirez left #mojo
06:24 inokenty-m joined #mojo
06:30 zivester joined #mojo
06:38 bramirez1 joined #mojo
07:00 cpan_mojo Mojolicious-Plugin-Ical 0.03 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-Ical-0.03
07:06 cpan_mojo Mojolicious-Plugin-Riotjs 0.03 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-Riotjs-0.03
07:36 batman sri: https://github.com/jhthorsen/mojo-mysql/pull/18/files <--- something for Mojo::Pg ?
07:38 inokenty-m joined #mojo
08:28 mattastrophe joined #mojo
08:45 KCL_ joined #mojo
08:48 Vandal joined #mojo
08:53 bramirez1 joined #mojo
09:00 berov joined #mojo
09:09 trone joined #mojo
09:37 sri batman: that's the fix i released yesterday ;)
09:42 punter joined #mojo
10:01 batman ok. wasn't sure if you only fixed it in one place or everywhere
10:04 amon joined #mojo
10:20 sri marcusr, tempire, crab: vote more!
10:23 sri looks like we now have +2 votes for https://github.com/kraih/mojo/pull/775
10:25 good_news_everyon joined #mojo
10:25 good_news_everyon [mojo] kraih pushed 2 new commits to master: http://git.io/ve456
10:25 good_news_everyon mojo/master 44fb153 Zoffix Znet: Added element_count method
10:25 good_news_everyon mojo/master b3cfcf0 Sebastian Riedel: Merge pull request #775 from zoffixznet/add_element_count...
10:25 good_news_everyon left #mojo
10:27 sri wait, is Zoffix Znet a real name? Oo
10:36 good_news_everyon joined #mojo
10:36 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/ve4Ns
10:36 good_news_everyon mojo/master 1f604b6 Sebastian Riedel: test the description too
10:36 good_news_everyon left #mojo
10:38 inokenty-m joined #mojo
10:57 meshl joined #mojo
11:11 Kripton joined #mojo
11:14 stl hi. can anoyone help me with replace attr? I have plugin for Asterisk::AMI http://pastebin.com/BkqRYEr2
11:15 stl but it trying call callback only once.
11:15 stl "Subroutine amih redefined at..."
11:19 stl credential for connect specially wrong
11:22 punter joined #mojo
11:28 batman stl: why are you doing $app->attr(amih => $connect); every 3 seconds?
11:31 stl batman: on error events from Asterisk::AMI i want callback for replace 'amih' throught 3 seconds. but it works only once.
11:31 batman that's so weird. sorry. i can't help you go down that path :(
11:31 stl it don't replacing attr every 3 seconds
11:34 stl tell me how it should be, please. i don't know how do it right
11:34 jberger stl: attr creates a new attribute with accessor method
11:34 stl that code as method for reconnect for this module
11:35 jberger you don't need to create a new attribute, you just need to set its value
11:36 stl $app->attr = sub {...}?
11:36 stl lvalue
11:36 jberger normally, you don't even need to use attr, you should use "has"
11:36 stl Can't modify non-lvalue subroutine call
11:36 stl jberger: i never used has. can you show me little example?
11:38 jberger http://mojolicio.us/perldoc/Mojo/Base#SYNOPSIS
11:39 stl jberger: I just read it. but did not understand how to apply in my case
11:41 jberger attr is essentially the internal method that implements "has"
11:41 jberger it builds attributes with accessor and optionally with a lazy default
11:42 jberger your case probably had no default
11:43 stl yes. have not default.
11:43 jberger so above register, put: has 'amih';
11:44 jberger oh I see your problem
11:45 jberger you are trying to make a plugin that creates an attribute for the app
11:45 mattastrophe joined #mojo
11:47 jberger the problem that you have is that setters are blocking and you are trying to have a default callback that generates its default Nonblocking
11:48 jberger either way, attr is not a setter
11:51 neilhwatson joined #mojo
11:52 stl should i use "has"?
11:52 batman stl: has() and attr() creates an attribute.
11:53 sri i sometimes wonder if we should get rid of attr
11:53 jberger since you are creating an attribute on another class, I guess not
11:53 batman or rather... attr()/has() creates a method which can get/set an attribute.
11:53 sri clearly there is some confusion
11:53 jberger but you probably just want to create a helper that closes over the object
11:54 batman in your case you're saying every three seconds: create a new method with the name "amih" and with a builder $connect
11:54 batman builder = a method (function) that creates the default value for the attribute
11:55 jberger sri: I think having the ability to dynamically create attributes is handy, but maybe it needs to be marked as rarely needed
11:55 jberger or used with care
11:56 stl my case: recreate method 'amih' after fail throught 3 seconds
11:58 jberger stl: imagine you are doing *{ref $app . '::amih'} = sub { ... }
11:58 jberger ever three seconds
11:58 jberger because you basically are
11:59 jberger and I dint that's what you mean
11:59 jberger doubt
12:01 cpan_mojo Rex-Repositorio 1.0.0 by Jan Gehring - http://metacpan.org/release/JFRIED/Rex-Repositorio-1.0.0 (depends on Mojolicious::Commands)
12:02 stl i'm confused.
12:03 batman stl: step back and explain what you're trying to achieve.
12:04 batman and now: i'm not interested in hearing about what you're doing. i want to know what your end goal is.
12:04 batman s/now/no/
12:07 stl i want create a helper that closes over the Asterisk::AMI object. on Asterisk::AMI disconnect or error - try reconnect throught 3 seconds. the connection must be one, and not every time new.
12:09 stl this is the most generic description of desired
12:11 mudler joined #mojo
12:13 bramirez1 joined #mojo
12:21 batman ok. do you also need a new ami object on disconnect, or can you re-use the same?
12:26 stl new
12:28 stl but may and reuse
12:29 stl i don't know how do it better
12:34 batman stl: this is way to simple, but i hope it can point you in the right direction: https://gist.github.com/jhthorsen/92114a3bf6861c10d338
12:35 batman and it has typos and probably other issues... but at least it doesn't call attr() every third second
12:35 batman stl: so... you don't need attr(amih => ...) since the helper "ami" can be called on $app and $c
12:36 batman and you will only have one instance, since it's kept around by $self (the plugin instance)
12:36 asarch joined #mojo
12:36 batman not sure why i've written "amih" all over the place...
12:37 batman stl: does this make any sense?
12:37 stl batman: many thanks. will try it use now
12:38 batman stl: as i said: that is not working code, but hopefully it will push you into the right direction
12:38 batman let me know when you have copied to code to somewhere so i can delete the gist
12:40 stl batman: copied
12:40 batman nice
13:04 stl good example - remove typos, some little modify and all works as i want
13:04 stl thx
13:20 mattastrophe joined #mojo
13:34 zivester joined #mojo
13:36 gryphon joined #mojo
13:44 mattastrophe joined #mojo
13:47 odin22 joined #mojo
13:48 cpan_mojo Mojolicious-Plugin-RemoteAddr 0.03 by Viktor Tuskyi - http://metacpan.org/release/KOORCHIK/Mojolicious-Plugin-RemoteAddr-0.03
13:52 risugg joined #mojo
13:53 risugg off topic - anyone using carton to manage dependencies?
14:00 batman risugg: me and marcusr are using it for convos - https://github.com/Nordaaker/convos
14:01 batman stl: the code is very fragile though. but i guess you will notice that soon enough :-)
14:02 risugg I'm having an issue with carton finding Crypt::SSLeay when REST::Client tries to load it, even though it exists in my local directory. It's in darwin2-level, and that's not in the INC path. I see you are using IO::Socket::SSL -- did you run into anything similar?
14:04 batman no. sorry :(
14:44 asarch joined #mojo
14:46 mattastrophe joined #mojo
14:55 sri this thread bugs me https://groups.google.com/forum/#!topic/mojolicious/3zAi2AmOY5g
14:55 sri nobody should assume that *_DEBUG=1 is a supported feature that needs to be user friendly
14:56 zackiv31 joined #mojo
14:58 Grinnz_ yeah not sure why he is trying to use it for deployment
14:59 sri if he keeps pushing he might ruin it for everyone else
15:02 batman sri: please don't allow that.
15:02 batman it would make me very sad :(
15:04 sri that's the problem with documenting stuff that's useful for a lot of people, but not actually a real feature :S
15:06 batman sri: is it documented? i've always been digging into the source code to see if it had a DEBUG constant :)
15:06 sri http://mojolicio.us/perldoc/Mojo/Server/Daemon#DEBUGGING
15:08 stephan48 maybe a explicit "Undocumented Features Cookbook" with a hudge warning that anything there could break without a warning?
15:08 batman ok. i don't mind removing *_DEBUG from the documentation.
15:09 sri stephan48: umm, they are documented
15:10 stephan48 oh i was refering to the line "that's the problem with documenting stuff that's useful for a lot of people, but not actually a real feature :S", as you saied, atleast once, everything which had documentation is considered a feature(and thus adherent to deprecation policies)
15:12 stephan48 nvm
15:13 batman why would anyone use hypnotoad if it's run in the foreground..?
15:13 batman i don't get that :(
15:14 Grinnz_ batman: i do often to catch log messages easier
15:14 Grinnz_ but permanently? no idea
15:14 batman Grinnz_: but what benefit does it have over prefork?
15:14 Grinnz_ it is configurable?
15:15 stephan48 the only benefit i could imagine would be in a supervisord setup, so it can always have direct control over the master
15:15 stephan48 but other than that?
15:15 mst batman: I believe he means foreground as in "I am using a supervisor process therefore I don't want it to daemonize itself"
15:16 mst daemontools, runit, etc.
15:16 pink_mist stephan48: well that's what the OP mentioned, wasn't it?
15:16 batman mst: "hypnotoad -f" # yeah
15:16 stephan48 ye but that still does not explain why he wants debugging
15:18 mst no, it doesn't, but that's a separate question
15:18 stephan48 true
15:18 batman sri: is there any difference between "app.pl prefork" and "hypnotoad -f app.pl" ?
15:18 batman (except that hypnotoad would be act differently with USR2)
15:19 Grinnz_ https://metacpan.org/pod/Mojo::Server::Hypnotoad#SETTINGS
15:19 sri well, you run everything through this code https://github.com/kraih/mojo/blob/master/lib/Mojo/Server/Hypnotoad.pm
15:19 sri so, config and USR2
15:20 sri but really, i've just looked through his threads, and he just seems quite confused
15:21 sri so i won't be taking his requests very serious anymore
15:23 batman \o/
15:25 sri this thread started strong and did not make it seem like user errors https://groups.google.com/forum/#!topic/mojolicious/sgUj3obB6eU
15:27 sri but i assume he did weird shit and redefined $SIG{CHLD} or so
15:27 sri so... meh
15:37 jberger batman, your useragent example was spot on
15:37 jberger quite a nutty thing to want logging output on STDOUT
15:40 Grinnz_ purl: nutty?
15:40 purl i haven't a clue, grinnz_
15:53 KCL_ joined #mojo
16:02 batman jberger: thanks
16:03 disputin joined #mojo
16:15 inokenty-w joined #mojo
16:29 punter joined #mojo
16:30 inokenty-m joined #mojo
16:31 Oleg joined #mojo
16:36 inokenty-m1 joined #mojo
16:37 dod joined #mojo
16:41 risugg joined #mojo
16:43 batman It's not even logging output. It's "help me! I have no idea what's going on, but more details might help me understand" output.
16:44 sri yea, no sympathy from me though, if you request changes before understanding what's going on it's your own fault
16:45 mst pity is just hatred without respect
16:45 sri i do wonder if we should somehow document that hypnotoad/prefork use SIGCHLD
16:46 sri doesn't really fit in anywhere though
16:46 sri http://mojolicio.us/perldoc/Mojo/Server/Prefork#MANAGER-SIGNALS
16:47 disputin joined #mojo
16:47 cfedde TERMis traditionally the shutdown gracefully signal.  See also bind, sendamil, syslogd, etc.
16:48 sri if there's a bug, please open an issue
16:49 ZoffixWork joined #mojo
16:52 sri pretty sure you're wrong though
16:52 ZoffixWork What's the recommended path to follow, when you have more than 4KB of session data to work with? Mojolicious::Plugin::Session is the sanest thing I see on CPAN, but the docs say "Embedded Mojo sessions are recommended for using instead of this module."
16:52 ZoffixWork I wonder how to interpret that comment....
16:53 ZoffixWork sri, and 'Zoffix Znet' is sufficiently real as the name :P
16:57 sri ZoffixWork: standard answer is, just use a database
16:58 sri i have yet to hear a sensible reason for storing more than 4kb in a session
16:58 ZoffixWork I have a shopping cart. If user adds about 50-90 products, I get over the limit, depending on how big product numbers are.
16:59 sri yea, i would store an id in the session and the shopping cart in a table
16:59 ZoffixWork Alright. I'
16:59 ZoffixWork Alright. I'll go with that approach.
16:59 Grinnz_ yeah pretty standard
17:00 sri all those server side session modules are usually terrible, just throwing a storable blob at a table
17:00 Grinnz_ i just rewrote our usage of CGI::Session in a day to get away from that horrible module
17:00 ZoffixWork I was just thinking of how to clean up stale carts in the database. I'd have to essentially update a time variable for each page load, to sync up the cart in the database to the cookie expiry date, won't I?
17:01 Grinnz_ yes generally you store an expire time with the server side sessions
17:01 Grinnz_ you dont actually need to expire the cookie too
17:01 inokenty-m joined #mojo
17:01 Grinnz_ well i take that back, we have it set as both i guess
17:02 Grinnz_ the cookie expires, and a process cleans up expired sessions in the db
17:02 mst ZoffixWork: I'd update it -if- the TTL had fallen by a certain amount
17:02 ZoffixWork So I figured instead of doing that, I'd "just throw a storable blog at a table" and have a generic database session :)
17:02 Grinnz_ i use a JSON blob, instead ;)
17:02 ZoffixWork mst++ # good idea.
17:04 cfedde also SIGQUIT is the dump core signal.
17:04 Grinnz_ eh?
17:05 cfedde SIGKILL is the exit now signal and your process never gets to see it.
17:05 Grinnz_ SIGTERM and SIGQUIT are often used interchangably to tell a process to stop
17:06 sri ZoffixWork: that's even worse with traditional server side sessions, since the entire session blob gets loaded and dumped on every request
17:07 cfedde SIGTERM and SIGINT are almost synonymous in the posix standard that is.  Mojo takes a different approach.
17:07 sri cfedde: mojo, apache, nginx, unicorn...
17:08 sri http://unicorn.bogomips.org/SIGNALS.html
17:08 batman ZoffixWork: I would have a shopping cart table. It can also be useful for seeing what people have looked at, even if not bought.
17:08 ZoffixWork Good point.
17:08 purl nice and sharp
17:08 batman And I would not purge any rows, before I have to.
17:08 batman It's valuable information.
17:08 cfedde http://en.wikipedia.org/wiki/Unix_signal#POSIX_signals is a reasonable extraction from the standard.
17:09 cfedde note that sigquit says: "The SIGQUIT signal is sent to a process by its controlling terminal when the user requests that the process quit and perform a core dump."
17:09 sh4 joined #mojo
17:09 batman ZoffixWork: I've always thought I had to clean up session tables... I'm not so sure anymore. I would wait until my disk was full :)
17:10 Grinnz_ cfedde: web servers have a different set of needs for signals, hypnotoad generally follows what nginx and apache do
17:10 ZoffixWork batman++ # I could even use that to make product recommendations or something. Good idea.
17:10 batman Exactly
17:10 Grinnz_ indeed
17:11 batman I would however make it a bit difficult to add data to the session/cart table, so it doesn't get filled just because someone wrote a stupid crawler.
17:11 Grinnz_ you can then just use the regular session cookie, and store an id to the shopping cart table
17:11 sri hahahahahaha... not even google can update all its certs on time... http://arstechnica.com/information-technology/2015/04/google-let-root-certificate-for-gmail-expire-causing-e-mail-hiccups/
17:11 batman Maybe use csrf or something.
17:11 Grinnz_ sri: lol
17:15 sri the spec for opportunistic encryption is so annoying
17:16 sri browsers may request resources on an http page with https if an Alt-Svc header allows it, but only if the server speaks http/2...
17:16 mst wut
17:17 mst I'm starting to think HTTP/2 is going to be the XHTML 1.1 of HTTP
17:17 sri the reason given publically was that only http/2 includes a scheme as part of the protocol
17:20 cfedde Grinnz_: it is too bad that webservers did that. There are plety of signals available that could have been used for "non standard" purposes. Where here "standard" is posix.single.  thanks for the research fodder.
17:45 risugg joined #mojo
18:20 sri tempire++ # late votes matter too!
18:32 sri eeeep... "Expert with mod_perl and/or Mojolicious" https://www.odesk.com/o/jobs/job/_~0176dcbf25d006a06e/
18:36 Grinnz_ and/or... heh
18:37 Grinnz_ once again... at least it's postgres!
18:40 sri mojolicious, postgres, and remote... not too bad if you ignore the mod_perl ;p
18:40 punter joined #mojo
18:40 genio pst timezone would be annoying
18:46 hernan604 cool im looking for such remote job
18:46 punter joined #mojo
18:46 mattastrophe joined #mojo
18:47 hernan604 im tired of my current =p
18:53 dod joined #mojo
18:59 dod joined #mojo
19:00 jberger sri: that might just mean they are migrating from mod_perl to mojo
19:00 jberger so experts on either are in demand
19:00 Grinnz_ hopefully
19:00 purl rumour has it hopefully is lightweight
19:05 dod1 joined #mojo
19:05 dod joined #mojo
19:06 meshl joined #mojo
19:13 Oleg joined #mojo
19:13 meshl joined #mojo
19:24 punter joined #mojo
19:56 nolbuk joined #mojo
20:03 mattastrophe joined #mojo
20:04 mattastrophe joined #mojo
20:04 mattastrophe joined #mojo
20:10 sri what are you using by default? Cwd::abs_path or File::Spec::rel2abs?
20:11 batman i would like if hypnotoad didn't resolve the symlink
20:12 sri we don't use rel2abs atm at all
20:12 batman i've been wanting to symlink my "toadfarm" applications, so i can see which is which when i do ps.
20:12 sri so i'm sceptical
20:12 batman not a very good reason, but it's still a reason :)
20:12 sri abs_path appears 21 times
20:12 sri mostly in tests
20:14 sri i might be open to trying rel2abs in all places
20:14 batman why all or nothing?
20:14 sri because we are consistent right now
20:15 sri i'd like to keep that, and not deal with oddities from both functions
20:15 sri or can you coherently explain when to use each function?
20:15 sri and what the exact differences are
20:16 Grinnz_ it would be something to check between different OSes also
20:17 sri like
20:17 sri https://github.com/kraih/mojo/blob/master/lib/Mojo/Home.pm#L18
20:17 sri why is that a case for abs_path, and not rel2abs?
20:18 sri or
20:18 sri https://github.com/kraih/mojo/blob/master/lib/Mojo/Home.pm#L31
20:18 sri both are surrounded by File::Spec functions
20:18 ribasushi sri: rel2abs is logical-cleanup only, it does not consult the FS, and hence does not deal with symlinks at all
20:19 ribasushi on complex setups this can lend you into a "non-existent absolute path"
20:19 batman sri: i want to keep abs_path() i Mojo::Home, since it's a different case. i want it to return a file. not a symlink.
20:20 sri batman: that makes me -1-ish on the hypnotoad change
20:22 sri ribasushi: which one is your default choice?
20:22 ribasushi sri: it depends on the use-case really
20:23 ribasushi use Cwd's if unsure
20:24 sri for the record, we have 4 uses of abs_path, aside from the two in Mojo::Home there is one in hypnotoad and one in the server base class
20:24 sri https://github.com/kraih/mojo/blob/master/lib/Mojo/Server/Hypnotoad.pm#L43
20:24 sri https://github.com/kraih/mojo/blob/master/lib/Mojo/Server.pm#L47
20:24 batman sri: how come? if i do "link -s /usr/local/bin/convos $HOME/bin/convos" and run $HOME/bin/convos, wouldn't it make sense that the pid was written to $HOME/bin instead of /usr/local/bin ?
20:25 sri batman: you can say the same about Mojo::Home
20:25 batman s/link/ln/
20:26 batman sri: i don't agree. most of the time i want to get the actual file, and not the symlink. checking for symlink before i do open() is boring and will break more stuff
20:26 * Grinnz_ kind of wishes "nl" was a ln with the target and source arguments reversed
20:29 batman Grinnz_: nls () { ln -s "$2" "$3" } :)
20:29 Grinnz_ heh
20:29 batman oops! wrong index :P
20:29 mst $2 $1 surely
20:29 Grinnz_ i got the idea :P
20:30 batman no idea where $3 came from... i guess that's my batsignal
20:30 batman s/bat/bed/
20:30 batman :P
20:32 punter booking.com should drop Dancer & go Mojolicious
20:33 batman not just booking............
20:33 Grinnz_ all the internets!
20:33 sri they've hired half the dancer core team, so it seems unlikely
20:33 punter Which of the two fws is more popular, batman ?
20:33 sri we have pretty much no representation at booking
20:33 mst right, and that's a perfectly good reason to be using dancer
20:33 mst "we have core team members for X here" is a -huge- advantage
20:34 batman punter: fws?
20:34 punter frameworks
20:34 purl frameworks are for LOSERS
20:34 Grinnz_ lol
20:34 sri purl: shut up you!
20:34 purl ;-(
20:35 batman punter: https://github.com/kraih/mojo +1458, https://github.com/PerlDancer/Dancer2 +252 ... you tell me :)
20:35 punter huraah! :-)
20:35 batman punter: Dancer has +720 though...
20:37 mst and the metacpan ++ ratios are similar
20:37 mst so mojo definitely has more users who think to ++ things
20:43 sri dammit, i wonder if the decision to use abs_path here was intentional or just copypasta :S https://github.com/kraih/mojo/commit/bf3dec324372833dd0bf6902fe516981c51d3553#diff-353f5915f6d2ad1575d48dc9e2a9f8cbR143
20:47 Grinnz_ http://runtimejs.org/ http://node-os.com/
20:47 Grinnz_ http://fc03.deviantart.net/fs70/i/2013/320/1/2/i_don_t_want_to_live_on_this_planet_anymore_by_gbrsou-d6uh5ce.jpg
20:47 cpan_mojo Mojolicious-Plugin-OAuth2 1.52 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-OAuth2-1.52
20:47 sri oh, that's great, replacing abs_path with rel2abs doesn't even pass the tests... so it's out anyway :)
20:47 sri batman: ^^
20:48 batman okidoki.
20:48 batman i think my reason for wanting rel2abs() is pretty bad anyway...
20:48 sri the Mojo::Server bit messes everything up
20:48 batman i would like to be able to set my own $0 though...
20:49 * batman zzz
20:50 * jberger turns off the batsignal
20:53 sri interesting
20:53 sri one test actually breaks if i remove the abs_path
20:54 sri ok, this is scary
20:54 sri the Mojo::Server change above actually worked on travis, but not my os x box
20:54 Grinnz_ o_0
20:54 sri yeaaaaa... not gonna touch this
20:55 sri https://github.com/kraih/mojo/blob/master/t/mojolicious/json_config_lite_app.t#L19-L22
20:55 sri that one breaks without the abs_path
20:56 sri "Configuration file "/Users/sri/repo/mojo/t/mojolicious/t/mojolicious/public/hello.txt" missing, maybe you need to create it?"
20:57 sri i remember the double t directory trouble
20:57 jberger :o
20:58 sri how abs_path manages to fix the problem... i have no clue
20:58 jberger having delved into that realm once, I have no real ambition to do so again: http://blogs.perl.org/users/joel_berger/2012/12/a-question-of-location.html
20:59 sri hahaha
21:01 sri oh of course, i see how the doubt t directory problem happens
21:02 sri the Config plugin checks the path with file_name_is_absolute and if not passes it to Mojo::Home::rel_file
21:02 sri s/doubt/double/
21:04 Grinnz_ jberger++ # excellent story
21:05 jberger I've been wanting to write a follow up, but I haven't found a good "case"
21:05 jberger closest was the $^X thing in the server scripts in mojo a few months back
21:14 berov Hi, When I am using Test::Mojo and I do $t->get_ok($url)->status_is(200) but instead I get a status==500, how can I see what happened from within the test? I mean..
21:14 berov my tests reports are send via cpantesters
21:14 good_news_everyon joined #mojo
21:14 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/veus0
21:14 good_news_everyon mojo/master 49978de Sebastian Riedel: abs_path should not be necessary
21:14 good_news_everyon left #mojo
21:15 berov but it is unconvenient to write to the testers and ask them "what happened"
21:15 sri http://mojolicio.us/perldoc/Test/Mojo#or
21:16 berov sri: Thanks
21:17 berov then I should be able to get somehow to the internals (or log)
21:18 jberger ->or(sub{ warn $c->tx->res->body })
21:18 berov to be more specific
21:18 berov I have 500 i.e something died
21:19 jberger oh, sorry, I was thinking about scraping sorry
21:19 berov interestingly enough on some servers everething is fine on othere FAIL
21:19 jberger actually
21:19 sri http://mojolicio.us/perldoc/Test/Mojo#app
21:19 jberger probably works, tests are in dev mode
21:20 berov but I need to know what happened there
21:20 berov here is an example of reports really hard for me to guess
21:20 berov http://www.cpantesters.org/distro/A/Ado-Plugin-Site.html
21:20 jberger berov: if you dump the 500 page don't you see everything that you would have from the dev debug page?
21:21 jberger (also note that I meant $t rather than $c)
21:21 sri http://mojolicio.us/perldoc/Mojo/Log#history
21:22 berov jberger,sri;  ah good ideas, thanks!
21:25 berov sri: very handy $log->history ! missed that feature :) now I will not bother testers :)
21:41 noganex joined #mojo
22:11 xtetsuji__ joined #mojo
22:16 vmb joined #mojo
22:27 woz joined #mojo
22:40 risugg joined #mojo
22:55 woz joined #mojo
22:55 zackiv31 joined #mojo
23:00 risugg joined #mojo
23:07 absolut_todd joined #mojo
23:30 risugg joined #mojo
23:42 disputin joined #mojo
23:46 disputin joined #mojo
23:47 woz joined #mojo
23:51 zivester joined #mojo
23:54 Zoffix joined #mojo
23:54 mattastrophe joined #mojo
23:54 mattastrophe left #mojo

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