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

IRC log for #mojo, 2015-04-28

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

All times shown according to UTC.

Time Nick Message
00:05 Grinnz try just loading it multiple times with different arguments?
00:05 Grinnz i'm not sure if it would work but i don't see why not
00:10 Grinnz and yes you load them in the startup sub, they need to setup routes
00:10 DesertFox Just load it a bunch of times and attach needed session info into the mojo session?
00:11 absolut_todd joined #mojo
00:11 hasan Grinnz, DesertFox: yes exactly like you both said
00:11 hasan it works. learned a new thing today :)
00:12 DesertFox Me too, but I would like to know how to handle it in other senarious.
00:12 DesertFox scenarios even.
00:12 Grinnz that was quite a typo
00:12 DesertFox Its after 5.
00:12 DesertFox Don't judge me.
00:13 DesertFox !
00:33 asarch joined #mojo
00:34 cpan_mojo Mojolicious-Plugin-BasicAuthPlus-0.10 by BLR https://metacpan.org/release/BLR/Mojolicious-Plugin-BasicAuthPlus-0.10
00:36 punter joined #mojo
00:41 Onigiri joined #mojo
00:44 hshong joined #mojo
01:20 absolut_todd joined #mojo
01:22 klapperl joined #mojo
01:54 inokenty-w joined #mojo
02:00 jberger loading a plugin is not (usually) a stateful thing
02:01 jberger with notable exceptions
02:01 jberger but those exceptions are all per module
02:03 Onigiri joined #mojo
02:54 noganex joined #mojo
03:02 mattastrophe joined #mojo
03:10 Onigiri joined #mojo
03:14 memowe joined #mojo
03:15 Grinnz man where's all the OS X smokers on cpantesters?!
03:15 Grinnz oh yeah, "costs money"
03:24 cpan_mojo Mojolicious-Plugin-Directory-0.11 by HAYAJO https://metacpan.org/release/HAYAJO/Mojolicious-Plugin-Directory-0.11
03:35 jberger Grinnz: I always had to beg people to run Alien::Base tests on mac
03:36 jberger I have one now btw
03:36 jberger though I'm not at it
03:36 jberger ping me in the morning if you want me to ruin some tests
03:36 jberger hahaha
03:36 jberger run
03:45 irq joined #mojo
03:57 basic6_ joined #mojo
03:58 mattastrophe joined #mojo
04:08 fhelmber_ joined #mojo
04:09 memowe joined #mojo
04:10 absolut_todd joined #mojo
04:39 melo joined #mojo
05:42 kaare joined #mojo
05:58 marcus wrecked
05:59 bramirez joined #mojo
06:16 dod joined #mojo
06:20 tiejl joined #mojo
06:21 dod joined #mojo
06:28 hshong joined #mojo
06:43 batman marcus: early bird?
06:43 batman marcus: early bird != happy bird? :)
06:43 marcus batman: I'm a hoppy frood
06:43 batman sweet \o/
06:50 sivoais joined #mojo
06:55 AndrewIsh joined #mojo
07:02 eseyman joined #mojo
07:03 bramirez joined #mojo
07:03 memowe joined #mojo
07:07 Vandal joined #mojo
07:16 tiejl joined #mojo
07:17 wariat joined #mojo
07:18 trone joined #mojo
07:25 melo joined #mojo
07:26 memowe joined #mojo
07:40 tiejl_ joined #mojo
07:58 fhelmbe__ joined #mojo
08:05 fhelmber_ joined #mojo
08:09 bramirez joined #mojo
08:14 dod joined #mojo
08:18 depesz left #mojo
08:33 harry joined #mojo
08:35 * sri wonders what disque means for redis pubsub in the future
08:36 sri ...or rather redis in general... disque seems still very job queue centric
08:42 irq joined #mojo
08:48 gatitskiy joined #mojo
08:48 gatitskiy joined #mojo
09:11 Dandre joined #mojo
09:14 augensalat writing unencoded data can send the Reactor into a busy loop: https://gist.github.com/augensalat/2cd52987fd3ab85ddb10
09:16 coolo batman: assetpack now creates a warning "[warn] AssetPack will store assets in memory
09:16 coolo batman: but what I wonder: as I load the plugins before setting $self->log->path all my logs go to STDERR now
09:16 coolo is this to be exected? aka should I load plugins as last step?
09:21 batman coolo: what do you mean about warning? $app->log->warn or just warn() ?
09:21 batman why do you care? it's a warning, right..?
09:21 batman what i think is more interesting is do you understand what it means?
09:22 coolo batman: I don't care about the warning at this point, the order is my problem
09:23 coolo as the plugin loading triggers a log->warn call, it sets the handle to STDERR in Mojo/Log - as the log->path call happens afterwards
09:23 coolo and from then on it will log everything into STDERR and not my log file
09:25 batman ah! right. i see :) well. i always set up logging as the first step in startup() to make sure no other code "hijack" the log object
09:25 coolo I kind of blindly assumed, that the path call would reset the handle - but that's not happening
09:26 batman assetpack is just a coincident. it could be -any- plugin
09:26 coolo so lesson learned :)
09:26 batman coolo: +1. i've suggested it. can't remember why the suggestion was turned down.
09:26 coolo so on to the actual warning then :)
09:30 coolo batman: so if I understand your code right it looks for a writable static path and as it can't find any, it outputs this warning
09:31 coolo but as my app is deployed from packages with pregenerated assets and runs as nobody, there is no such thing as writable path
09:36 melo joined #mojo
09:46 sri batman: discussion derailed after the Mojo::Log::reopen proposal
09:46 sri i vaguely remember that we wanted to address the "delete attribute value" problem
09:46 sri and then nobody cared anymore
09:51 fhelmber_ joined #mojo
09:51 batman coolo: right. i see now that the log message is stupid.
09:51 batman coolo: no reason to log if _not_ dynamic assets will be created.
09:51 batman coolo: can you open an issue on github so i don't remember to remove it?
09:52 batman sri: what is "delete attribute value" problem?
09:53 batman what i suggested was to convert path() to a method which acted as a setter/getter, and would clear "handle" on set.
09:59 coolo batman: is https://github.com/jhthorsen/mojolicious-plugin-assetpack/issues/56 good enough?
10:00 * coolo struggled to come up with a shorter summary and failed :)
10:00 batman it's perfect
10:08 ray joined #mojo
10:08 ray hello!
10:28 csson joined #mojo
10:39 batman hello ray
10:58 fhelmber_ joined #mojo
11:01 Kripton joined #mojo
11:01 mattastrophe joined #mojo
11:18 meshl joined #mojo
11:19 icjs joined #mojo
11:26 fhelmber_ joined #mojo
11:52 jberger sri: it was only me that cared about attribute access
11:52 jberger and only someone else that cared about reopen
11:59 chansen joined #mojo
12:00 neilhwatson joined #mojo
12:06 batman i don't know what "attribute access" means :(
12:07 batman i think at least four different people (including myself) have asked about $log->path() to delete handle()
12:15 ajr_ joined #mojo
12:16 bramirez joined #mojo
12:16 jberger hash access
12:16 purl hash access is not a method call
12:16 jberger purl: exactly
12:16 purl jberger: excuse me?
12:17 fhelmber_ joined #mojo
12:26 sri batman: there is also an inconsistency, Mojo::Log and Mojo::Asset::File currently have the same behavior regarding the handle and path attributes
12:26 batman i agree
12:26 batman i guess i should have suggested it before the 6.0 release :/
12:27 batman forgot about it. doing hackish solution that works instead
12:27 sri Mojo::Log->new(path => ...) is also a thing i believe
12:27 sri if path becomes a method, that working wouldn't be implied anymore
12:28 sri riche: you're not a sepcial snowflake, every single one of us has to defend our proposals
12:29 absolut_todd joined #mojo
12:29 batman true indeed. what i mean was replacing has "path"; with sub path {}, but it's not possible to define an attribute with sub attr{} ...?
12:29 batman (i know it's possible, just thought it might go against some policy)
12:30 sri there is no precedent
12:30 sri all our attributes are defined with has
12:30 sri we have no rules for doing attributes with real methods
12:30 batman i don't  get "there is no precedent" (language). do you mean you can't have sub path{} listed under ATTRIBUTES?
12:31 batman or that you _can_ ?
12:31 sri there is no existing case
12:31 sri it has never been done
12:31 batman ok.
12:32 sri personally, i consider it very ugly
12:33 sri since ->foo('bar') is not the same as ->new(foo => 'bar')
12:33 sri in your case the first one has special magic to clear the handle
12:33 sri the second does whatever
12:34 batman yeah. i agree it's ugly. but it's also very intuitive :) (to some of us)
12:34 sri you better use Moose at that point
12:34 sri i don't think so actually
12:35 sri expecting attribute accessors to have side effects is silly
12:35 batman i guess that makes sense
12:35 batman and i agree it's ugly :) https://ssl.thorsen.pm/paste/8e67c8c1b77b
12:37 batman how about having a close() method? $handle if $handle = delete $self->{handle}
12:37 sri i lack the proper terminology here i guess, but once you have side effects, it's not just a property of the object anymore, but becomes a capability (as in method)
12:38 sri so, listing it under attributes is just wrong
12:38 batman sri: i agree. thanks for pointing it out.
12:51 stryx` joined #mojo
12:53 Grinnz batman, https://metacpan.org/pod/Mojo::Log::Clearable
12:53 Grinnz i rebless my app log to this in startup for this reason
12:53 Grinnz (look at the source ;)
12:54 batman Grinnz: hm... that seems a bit "too much"
12:54 Grinnz it is two lines of code :)
12:57 Grinnz https://github.com/jhthorsen/mojo-mysql/pull/19 this is.... interesting :P
13:06 sri haha
13:08 sri quite creative
13:13 ZoffixWork joined #mojo
13:14 ZoffixWork Hey, why is this giving me a 404, when trying to access /   ? http://fpaste.scsys.co.uk/474923
13:14 ZoffixWork Says in the list of available routes on the debug page "/*route
13:14 ZoffixWork
13:14 ZoffixWork *
13:14 ZoffixWork
13:14 ZoffixWork "index""
13:14 ZoffixWork ooops
13:14 mattastrophe joined #mojo
13:14 sri http://mojolicio.us/perldoc/Mojolicious/Guides/Routing#Wildcard-placeholders
13:15 sri (.+) vs (.+)?
13:16 ZoffixWork Ah, OK. got it.
13:16 sri or rather (.+) vs (.*)
13:16 ZoffixWork Thanks, sri++
13:17 sri http://mojolicio.us/perldoc/Mojolicious/Guides/Routing#Catch-all-route
13:17 sri you want that
13:23 batman Grinnz: yeah, it sure is interesting :D
13:23 batman it actually looks rather sane as well.........
13:24 ZoffixWork I guess this is nonsense? $ua->start( $c->tx );
13:24 ZoffixWork I'm getting Can't call method "timeout" on an undefined value
13:24 ZoffixWork Trying to write an app that will interface with a website. All I want it to do is munge the headers :/
13:25 ZoffixWork The rest should function like if the user was using the original site
13:25 * ZoffixWork spots Mojolicious::Plugin::Proxy
13:26 batman ZoffixWork: yeah, either that or you can look at https://github.com/mojoconf/MCT/blob/master/lib/MCT/Plugin/ACT.pm
13:27 ZoffixWork Thanks
13:27 gryphon joined #mojo
13:34 cpan_mojo Mojo-IOLoop-ReadWriteFork-0.12 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mojo-IOLoop-ReadWriteFork-0.12
13:43 dp_ joined #mojo
13:44 ZoffixWork Mojolicious::Plugin::Proxy doesn't seem to work good with redirects...
13:44 ZoffixWork and ACT thing fails to fetch CSS files (or that's what it looks like) :)
13:45 ZoffixWork World is never perfect lol
13:52 ZoffixWork Ah, I see. It's because of $remote_path =~ s!/+$!!; $local_path =~ s!/+$!/!;  business in ACT. It leads to http://foo//bar.css URLs where the original was /bar.css
13:52 batman ZoffixWork: The ACT thing is specific for ACT. You need to configure it properly to work with -whatever-
13:53 ZoffixWork What's "ACT"?
13:53 batman http://act.mongueurs.net/
13:54 ZoffixWork Ah
13:54 asarch joined #mojo
13:54 ZoffixWork That code seems to do 99% of what I want it to, so batman++ :)
13:55 batman ZoffixWork: That's why it's not on CPAN, hehe
13:59 niczero BestPractical RT depends on Mojo::DOM
13:59 niczero crying shame it doesn't use more of Mojo
14:01 Lee small steps :)
14:03 vytas joined #mojo
14:08 xdg jhthorson here?
14:08 jberger niczero: I disagree, I want people to use Mojo wherever they need to
14:08 xdg This should be runnign for end uses: https://metacpan.org/source/JHTHORSEN/Toadfarm-0.55/t/run-as.t
14:08 jberger xdg: batman
14:08 xdg A CPAN Tester flagged it as a security risk after seeing a sudo attempt in his logs
14:09 xdg This *should not* be runnign for end users.  (Sheesh)
14:09 jberger batman: ^^
14:11 jberger niczero: I encourage Mojo use as a toolkit, I want people to use Test::Mojo for non mojo projects, and Mojo::DOM and ::UserAgent
14:11 Grinnz jberger, i'm not sure how that's disagreeing
14:11 jberger "crying shame it doesn't use more of Mojo"
14:12 jberger maybe its not "disagreeing"
14:12 jberger maybe I'm saying, lets not appear too militant
14:12 Grinnz heh
14:13 jberger ("come the revolution, the world will know! ...")
14:13 jberger hehe
14:13 theo *cries in spanish*
14:13 Grinnz i don't care what framework it uses, my problem with RT is usability and design :P
14:14 jberger I'll admit that we didn't even consider it at $work
14:14 Grinnz bugtrackers are a hard problem, but there are a few that have done it decently, i would consider github's to be "mostly there"
14:15 Grinnz these ones that are reminiscent of bugzilla though, meh
14:18 cfedde any more we just use issues inside github.
14:19 genio RT... Mason.  need I say more?
14:20 niczero jberger: (a) you haven't seen Mojar or you'd know I was there before you :) and (b) if you saw RT dependencies you'd see what I was talking about
14:20 Grinnz heh
14:21 Grinnz there are a few projects where i've thought to myself "this project could replace about 10 of these dependencies with a few mojo modules"
14:23 shadowpaste "niczero" at 217.168.150.38 pasted "RT dependencies for non-developers" (79 lines) at http://paste.scsys.co.uk/474941
14:24 ajr_ Is render_fill a Mojo method?
14:25 jberger niczero: (a) I haven't really looked at Mojar no, I should
14:25 jberger (b) that's not so bad actually
14:25 jberger I'm in the process of converting a Mason site at $work
14:25 jberger it translates quite nicely too, tbh
14:25 jberger the template syntax is similar
14:26 jberger so we get the hooks in them now, maybe soon they start using it :-)
14:26 jberger I really should release some of my Mojo-Mason hacks too, to encourage people
14:26 jberger mst++ for that idea
14:34 cpan_mojo Mojolicious-Plugin-PlackMiddleware-0.35 by JAMADAM https://metacpan.org/release/JAMADAM/Mojolicious-Plugin-PlackMiddleware-0.35
14:34 cpan_mojo Mojolicious-Plugin-ReplyTable-0.04 by JBERGER https://metacpan.org/release/JBERGER/Mojolicious-Plugin-ReplyTable-0.04
14:40 lluad joined #mojo
15:04 ajr_ Just a thought for a future version: if the 404 diagnostic in the morbo log mentioned what it couldn't find, it might be a useful clue.
15:04 batman xdg: that's awful! There should have been a skip_all unless $ENV... :(
15:05 batman I will fix it as soon as I get home
15:05 xdg batman, cool!
15:13 sh4 joined #mojo
15:14 sri ajr_: it already does
15:15 sri if you don't see anything, it doesn't know
15:30 batman xdg: Oh! I remember why I did it now. I wanted the else{} to kick in on CPAN testers.
15:30 batman Didn't think it was a bad idea.
15:30 batman I originally had the %env thing in there, but removed it.
15:31 batman Will add it again.
15:31 xdg batman, I think anyone seeing a sudo attempt from a CPAN module during testing is going to get a little freaked.
15:32 xdg it's one of those little things that reminds us how much we're blindly trusting CPAN authors not to be malicious :-)
15:36 batman xdg: yeah. i see how stupid that was now.
15:37 odin22 joined #mojo
15:37 odin22 joined #mojo
15:38 xdg I'd actually be less bothered if it was protected with an "if ($ENV{AUTOMATED_TESTING})" because then at least you're limiting it to people who accept the risks of running everything.
15:38 xdg They might not *like* it, but at least they see that you thought about it.  :-)
15:38 batman xdg: https://metacpan.org/release/JHTHORSEN/Toadfarm-0.56
15:38 xdg batman++
15:39 batman xdg++ # thanks for bringing it up!
15:39 batman at least the code wasn't actually harmful :)
15:39 xdg indeed.  I'll tell the cpan-testers discuss mailing list.
15:40 batman thank you!
15:41 xdg hth
15:41 * xdg goes back to lurking &
16:05 mst batman: I tend to put that sort of thing in xt/
16:05 batman mst: yeah. i suck at xt/
16:06 batman never used it and don't know much about it
16:06 Grinnz_ batman: xt/ is automatically set as requiring AUTHOR_TESTING by dzil
16:06 Grinnz_ er
16:06 Grinnz_ xt/author/ is that
16:06 batman yeah. i'm not going to cpanm a monster.
16:07 mst uh, this is fuck all to do with dzil
16:07 mst please don't hallucinate things
16:07 batman very much happy with git ship
16:07 Grinnz_ dzil does that, i didnt say it created it :P
16:07 batman mst: i know. just saying :)
16:07 mst batman: xt/ is basically 'tests that you should run author side, but not user side'
16:08 batman mst: so xt/ is ignored unless you do prove -l xt/*.t ?
16:08 mst batman: assuming you're using EUMM, 'TESTS => (-e 'META.yml' ? 't/*.t' : 't/*.t xt/*.t')'
16:08 mst will make 'make test' run the xt/ tests but only in a checkout
16:08 batman that's clever
16:11 batman https://github.com/jhthorsen/app-git-ship/commit/28a0abe944d3822f206789abd0a16268535bb604 :)
16:19 mst batman: Distar uses META.yml's absence to go into author mode
16:19 mst if you're curious, try unpacking e.g. a Moo dist
16:19 mst and doing 'rm META.yml; perl Makefile.PL'
16:20 Grinnz_ i kind of like that dzil can determine that in the fact it's being run at all :P separation of responsibilities and all
16:25 batman mst: "Distar"..?
16:27 mst batman: I already told you what to do if you're curious :)
16:27 batman yeah, i just don't know that word.
16:27 jberger batman: Distar is mst's release thingy, which IIRC isn't public
16:28 batman aha
16:30 mattastrophe joined #mojo
16:35 batman mst: distar is pretty much git-ship... just even more hackish :)
16:35 batman ...and probably more correct
16:36 batman sorry. git-ship + an in house extension i use @work
16:36 irq_ joined #mojo
16:37 mst jberger: well, it's public in the sense it's in public git
16:37 mst but it's meant to be a bare minimum set of wrappers around EUMM
16:37 mst "if you can't learn how to use it by reading the source, you're not the target audience" sort of thing
16:37 batman mst: i might steal some bits back to git-ship, if that's ok...
16:37 mst by all means
16:37 batman thanks
16:37 mst I wanted something that worked for me and my contributors, that we didn't have to think about
16:38 batman +1
16:38 purl 1
16:38 mst but to support it for anybody else would require making it much more complicated, which would fail the second half of that plan
16:38 batman yeah. not a fan.
16:39 Grinnz_ things are always trickier once you have to make them work for other people :P
16:39 mst so I let people find it if they want to, but don't really support it as such
16:39 mst at which point, theft of anything useful is totally cool by me :D
16:39 batman i really wish i had better doc for git-ship :(
16:39 batman i wan to link to people on twitter, but i don't because the doc is crap :(
16:40 batman *want
16:40 batman or anywhere really
16:41 * batman listens to beasty boys. drinks beer. cleans the apartment.
16:41 batman almost perfect combo :P
16:42 Grinnz_ heh
16:42 jberger batman++
16:51 Grinnz_ one of these days i need to write some damn tests for my bot... thats the big remaining step toward releasability
16:53 Grinnz_ it's quite daunting, but Mojo::IRC's offline tests wil help
16:55 Grinnz_ i think i might also steal the "helper" name from mojolicious, "plugin method" is too vague
17:08 amon joined #mojo
17:11 batman Grinnz_: let me know if i can improve the "testability" of Mojo::IRC
17:12 batman me and marcus discussed the offline tests and none of us liked it, but i "forced" it through, since marcus didn't have a better option atm
17:14 Grinnz_ batman: will do
17:18 ToApolytoXaos joined #mojo
17:18 wariat joined #mojo
17:26 sh4 joined #mojo
17:39 misty_g3ar joined #mojo
17:41 harry left #mojo
17:46 dod joined #mojo
17:49 disputin joined #mojo
17:52 ajr_ joined #mojo
17:54 marcus \o/
18:03 pink_mist Grinnz_: btw, Unix::Groups installs fine on Cygwin ... don't know if it'll actually work though :P
18:03 Grinnz_ heh
18:03 Grinnz_ yeah, that makes sense, cygwin is "unix-like" in a lot of ways
18:06 good_news_everyon joined #mojo
18:06 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vfpER
18:06 good_news_everyon mojo/master 85cd3e7 Sebastian Riedel: update jQuery to version 2.1.4
18:06 good_news_everyon left #mojo
18:06 marcus wow, I just learnt about mouseless copy/paste in iTerm2.
18:06 marcus Guess I should have read the help before
18:07 dotandimet joined #mojo
18:07 mattastrophe joined #mojo
18:07 sri oh, prettify.js is maintained again \o/
18:08 sri https://github.com/google/code-prettify
18:08 marcus sri: 151 open issues?
18:22 _Dave_ joined #mojo
18:24 _Dave_ If I've done something like $foo = $app->routes->under('/' => sub { .. } ), can I then chain the under method on foo usefully...e.g. $foo->under('/special/link' => sub { ... }) ?
18:29 Grinnz yes
18:29 Grinnz $foo will be a sub-route object
18:31 _Dave_ is that what the "+" means in the "page not found" status returned by mojo when it can't satisfy a route?
18:33 Grinnz i believe so
18:33 Grinnz generally, the subroutes would not start with /, they append to the route of the parent
18:35 _Dave_ so I should say $foo->under('special/link' => ... ) ?
18:36 Grinnz yeah, that would make sense
18:36 Grinnz and then the ones under that relative to that one, etc..
18:37 _Dave_ ok I'll keep that in mind. thank you :)
18:53 ajr_ If there's a 404 in the debug log, is there anywhere to find the name that was being sought?
18:53 jberger does anyone know what it means if freenode saslserv just messaged me this "<sasl> failed to login to jberger.  There has been 1 failed login attempt since your last successful login."
18:54 jberger I don't even know what that is, and I don't believe I have attempted to login to anything secure
18:55 Grinnz someone tried to connect to freenode with sasl username jberger maybe? lol
18:55 jberger could be, I would have though nickserv would have been the messanger but ok
18:56 Grinnz nickserv does not handle SASL
18:56 Grinnz it happens at connection time
18:56 jberger could it be phishing?!
18:56 jberger somebody's bot trying to get passwords?
18:56 jberger mst: halp!
18:56 Grinnz saslserv looks legit
18:57 irq joined #mojo
18:57 Grinnz how would it get your password anyway? it didnt ask you to login?
18:57 mst jberger: oh, it means one of the brute forcing idiots has stumbled on your nick
18:57 mst that's why tor's currently disabled, it slows 'em down
18:57 jberger ok
18:57 jberger Grinnz / mst: thanks
18:58 jberger I know none of the IRC magick
18:58 Grinnz jberger, https://freenode.net/sasl/
18:58 Grinnz i use it because it makes a hell of a lot more sense than nickserv login
18:58 Grinnz and it lets me join #fedora which is +R
18:59 Grinnz without the chnce of not being logged in on join
19:02 sri Grinnz: where did you get "generally, the subroutes would not start with /"?
19:03 * sri has never heard about that
19:03 sri there should be no such example in the docs
19:03 Grinnz sri, that is just how i have done it
19:04 Grinnz i didn't know it was optional
19:07 sri actually, i think what you're doing might even be unsupported
19:10 sri i can only find docs for trailing slash, nothing about leaving out the leading one
19:10 Grinnz oh, maybe i'm just confused
19:11 Grinnz i don't actually leave it out
19:11 Grinnz lol
19:11 Grinnz _Dave_, sorry about that; use the leading slash for subroutes
19:12 _Dave_ it's ok, it didn't work anyway :)
19:13 sri allright, so there is no error in the docs :)
19:13 _Dave_ I'm writing a disambiguation app now to help me see how routes really work
19:13 _Dave_ and no, no book necessary ;)
19:13 _Dave_ yet
19:15 dotandimet joined #mojo
19:26 disputin joined #mojo
19:30 odin22 joined #mojo
19:32 melo joined #mojo
19:34 cpan_mojo Mojolicious-Plugin-MethodOverride-0.052 by GRAF https://metacpan.org/release/GRAF/Mojolicious-Plugin-MethodOverride-0.052
19:47 _Dave_ Ok, I now have a better question. Consider this script: http://pastebin.com/8A72XfNU
19:47 _Dave_ Why doesn't the chaining work?
19:48 _Dave_ might want to ignore the second comment in startup, my brain was moving too fast there
19:53 jberger _Dave_: I don't have time to analyze closely
19:53 jberger but remember that routes that have children cannot match on their own
19:54 Grinnz_ they can if they're unders
19:55 Grinnz_ _Dave_: what "doesn't work" about the second to last one?
19:56 _Dave_ None of these routes could generate a response for your
19:56 _Dave_ <code>GET</code> request for
19:56 _Dave_ <code>/foo/bar/b</code>
19:56 Grinnz_ _Dave_: that should match the url /bar, because it is an under chained from /
19:56 Grinnz_ the ->any('/foo') creates a new route
19:56 Grinnz_ which is also under $foo
19:56 purl okay, Grinnz_.
19:56 Grinnz_ purl: forget which
19:56 purl Grinnz_: I forgot which
19:56 _Dave_ ahhh I get it
19:57 _Dave_ I was thinking that any() set up $foo to respond to /foo only
19:57 Grinnz_ yeah any() is not a mutator
19:57 Grinnz_ it's much like under, it just doesn't create an intermediate route
19:58 _Dave_ thanks once again :D
20:16 vmbrasseur joined #mojo
20:27 berov joined #mojo
20:33 genio http://i.imgur.com/pbutcr6.jpg  # SPOILERS
20:34 Grinnz_ lol
20:39 melo joined #mojo
20:43 sri augensalat: this is why we don't get along https://metacpan.org/pod/Mojolicious::Plugin::MethodOverride#DESCRIPTION
20:43 sri "Unfortunately there is neither a way to specify another name, nor to use an HTTP header, nor to disable that feature."
20:44 sri you're always unconstructive
20:47 augensalat sri: oh c'mon - the last time I tried to be constructive I learned that you blocked me for pull request
20:52 mst "something bad happened because I was repeatedly unconstructive, so now I'm going to blame the something bad for continuing to be unconstructive" doesn't seem particularly logical to me
20:53 sri augensalat: so you're going to stay this way?
20:53 * jberger encourages calm discussion
20:54 jberger augensalat: having a more flexible option on CPAN is a good thing
20:54 jberger perhaps we can discuss mechanisms to not step on each other's toes
20:54 jberger ?
20:57 jberger or even, rephrasing to "Although Mojolicious' core does now contain a similar functionality, this module provides a more flexible solution"
20:58 sri augensalat was one of those i unblocked to give them another chance
20:59 sri but this stuff drains my energy
21:02 sri augensalat: your call, do you want to be a constructive member of the community or blocked for good?
21:11 _Dave_ is there an easy way to dump the stash (via Data::Dumper) to the logs for development that I might have missed? Other than $c->app->log...et al.
21:13 Grinnz_ the exception/not_found template does it
21:13 _Dave_ heh
21:13 jberger just force a die, it can be very handy
21:14 jberger tempire: did you ever fix up your console logger plugin
21:14 jberger ?
21:14 _Dave_ really? "die;"?
21:15 _Dave_ very nice
21:15 _Dave_ easy, and keeping with the uber minimalist style
21:33 * sri might be taking a few weeks off to recharge the batteries
21:34 jberger sri: other than removing user/groups mojo has been at a nice stasis lately, now seems like a fine time for that
21:34 * sri nods
21:35 jberger I've been really encouraged at the CPAN authorship lately (and that might be a little bit because I've had so many ideas)
21:35 jberger but I did do that search for Mojolicious::Plugin:: and was really excited
21:36 jberger preaction: did you have a chance to make that DBIC/Mojolicious::Plugin::ReplyTable example yet?
21:36 Zoffix joined #mojo
21:37 Zoffix Hey, is it possible to specify the default selected value with the select_field tag helper?
21:38 jberger Zoffix: IIRC you just set it like you would set any attribute on any tag
21:38 avkhozov_ joined #mojo
21:39 disputin joined #mojo
21:39 Zoffix :( ain't pretty
21:40 Zoffix I guess I can hack up some loop. I have 13 canuk provinces as options, so each one would be a test for whether the option that needs to be "selected" is it.
21:40 jberger before I offer too much advice, let me a least look at it again
21:41 Zoffix I can specify ['Yukon','YT', selected => 'selected'], for individual options. I see that this way works.
21:41 Zoffix but that's hardly ideal.
21:42 Zoffix Yeah, looks like the only way, based on the sauce code.
21:43 vmbrasseur joined #mojo
21:46 vmb joined #mojo
21:50 Zoffix It's actually not bad at all: https://github.com/XTaTIK/XTaTIK/blob/master/lib/data.html#L94
21:50 Zoffix Considering this would rarely be needed.
21:52 mattastrophe joined #mojo
21:54 jberger Zoffix: actually, did you try that first?
21:54 jberger without the map
21:55 Zoffix You mean specifying default as the first argument? How? Just a string instead of an arrayref? Then it just makes an <option value="$foo">$foo</option> out of it
21:55 Zoffix And based on this, it's not an option: https://metacpan.org/source/SRI/Mojolicious-6.08/lib/Mojolicious/Plugin/TagHelpers.pm#L144
21:57 jberger I just know that the taghelpers when resubmitted can keep their selections
21:57 jberger I have to admit, its been a long time since I have used that functionality
21:57 Zoffix That happens because of this: https://metacpan.org/source/SRI/Mojolicious-6.08/lib/Mojolicious/Plugin/TagHelpers.pm#L131
21:58 Zoffix Ohhh. I probably need to go that route anyway. Otherwise, the defaults I'm feeding it will conflict with anything that's submitted
21:58 Zoffix >_<
22:00 sri it's smart enough to override the defaults
22:00 Zoffix Ah, sweet.
22:02 sri personally, i would go with "% param province => 'AB' unless param 'province';"
22:03 Zoffix I don't follow
22:03 sri to set the default
22:03 sri http://mojolicio.us/perldoc/Mojolicious/Plugin/TagHelpers#DESCRIPTION
22:04 Zoffix Oh neat. Wasn't aware of that. sri++
22:08 jberger Zoffix: see that was what I was trying to say, but not very well!
22:08 Zoffix :)
22:22 meshl joined #mojo
22:47 vmbrasseur joined #mojo
23:44 tempire jberger: I haven't touched any of my cpan modules in quite a while
23:44 tempire other than someone doing a PR about a month ago
23:46 jberger tempire: http://forum-s3.pinside.com/201310/1161704/140159.jpg

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