Camelia, the Perl 6 bug

IRC log for #mojo, 2012-12-22

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

All times shown according to UTC.

Time Nick Message
00:14 Molaf__ joined #mojo
00:31 bpmedley cfedde: I think so.
00:32 bpmedley cfedde: I use /opt/<name>/etc/conf.d to store them.
00:56 mire_ joined #mojo
01:12 Mike-PerlRecruiter_ joined #mojo
01:13 laouji joined #mojo
01:21 cfedde interesting
01:54 ifim left #mojo
01:55 egopro joined #mojo
02:02 SirG joined #mojo
02:14 laouji joined #mojo
02:16 bpmedley cfedde: With symlinks in /etc/httpd/conf.d
02:38 dabudabu joined #mojo
03:02 asarch joined #mojo
03:20 iskyee joined #mojo
03:37 noganex_ joined #mojo
03:43 laouji joined #mojo
03:48 Miked joined #mojo
04:15 egopro joined #mojo
04:50 xaka joined #mojo
04:59 connor_goodwolf joined #mojo
05:20 egopro joined #mojo
05:39 egopro joined #mojo
05:54 iskyee joined #mojo
05:59 d4rkie joined #mojo
06:00 d4rkie joined #mojo
06:51 Miked joined #mojo
07:10 Vandal joined #mojo
08:50 amirite joined #mojo
08:50 amirite what's the mojo helper to get the full (relative from the host) request url with query string included?
08:51 amirite url_with
09:05 duncanthrax joined #mojo
09:20 ryozi joined #mojo
09:22 dod joined #mojo
09:38 dod joined #mojo
09:50 sinkovsky joined #mojo
10:41 navi joined #mojo
11:09 Miked joined #mojo
11:21 ObseLeTe joined #mojo
11:44 mire_ joined #mojo
12:14 wircus_ https://twitter.com/hwatatta​ma/status/282401507398270976 apparently we're still fast-paced because we deprecated something according to our development guidelines.
12:16 wircus_ hmpf
12:17 wircus_ https://twitter.com/hwatatta​ma/status/282401507398270976 Apparenly we're still 'fast paced' because we deprecated something according to our development guidelines.
12:17 wircus_ hope we'll always stay fast paced then.
12:29 bc547 joined #mojo
12:48 iskyee joined #mojo
13:10 eugen_ joined #mojo
13:13 Mike-PerlRecruiter_ joined #mojo
13:53 navi joined #mojo
14:10 * sri doesn't know what's fast paced about a deprecation
14:12 ObseLeTe joined #mojo
14:12 ObseLeTe joined #mojo
14:47 Foxcool joined #mojo
14:51 navi_ joined #mojo
15:10 mire_ joined #mojo
15:10 Miked joined #mojo
15:15 Britzel_ joined #mojo
15:24 GabrielVieira joined #mojo
15:31 asarch joined #mojo
15:40 GabrielVieira joined #mojo
16:17 tholen42 joined #mojo
16:19 DaTa joined #mojo
16:54 lammel2 joined #mojo
16:59 basic6 joined #mojo
17:02 basic6 for all database related stuff in perl, i've used DBI so far. is there a recommended object relational mapper that works well with mojolicious?
17:30 d4rkie joined #mojo
17:31 inokenty basic6: DBIx::Class
17:33 inokenty basic6: https://github.com/tempire/mojoexample
17:47 janus if you alway used DBI stick with it for productivities sake - otherwise you will spend quite some time learning something new for a task you already know how to do
17:48 janus unless you have api-wise precise specs that would make such a thing fit - avoid it
17:49 janus respectively, don't just do it without an informed opinion about what you are going to deal with
17:49 xaka joined #mojo
17:50 inokenty And I think that DBIx::Simple is much better and easier to use than plain DBI
17:52 janus if replacing sql with perl and crippling the native query language powers helps, yes
17:55 inokenty No, I'm talking about convenient methods like  ->hashes, ->map, ->hash, ->arrays, etc. I don't use ->update, ->insert and other methods with SQL::Abstract
17:57 janus hm, useful but not worth buying into a new module IMHO - easy to stick in with very little glue code above DBI
17:58 basic6 i have to rewrite old, ugly php code (no more php) in perl. part of it is a tiny little online shop so there's some database stuff i'll have to do (and i know how to do that with DBI). but it's so minimalistic that i'm not so sure if it's worth creating a DBIC schema and all that... maybe i'll find a way to write some nice wrapper code for those few db related things which does the sql stuff "amnually" using DBI. then in a few months, i could adju
17:58 basic6 st those wrapper functions to only use a DBIC schmea
18:00 janus for this type of situation i wanted to give DBIx::Dictionary a try...
18:00 janus dead simple query outsourcing and a pretty clean api with very few lines of code
18:02 xxtjaxx_ Hi! Just a quick question: http://paste.debian.net/218317/ as in the paste: The routes pasted plus the urls. first url will 404 the second one not because host doesnt have a . in it. Why?
18:03 basic6 janus there's another interesting perl module. looks like a compromise between SQL/DBI and an OO mapper like DBIC
18:04 janus xxtjaxx_: in /foo/:bla, :bla does not match things with a dot, see Mojolicious::Guides::Routing
18:06 janus basic6: I've been in the vietnam of ORMs for some time - please make love, not war ;)
18:10 tempire basic6: DBIC is worth learning.
18:10 tempire But it will take a while.
18:11 xxtjaxx_ janus: Okay. fixed it. But why is that actually?
18:13 basic6 tempire i'm sure it is and at some point in the future i will be using DBIC and be happy with it. question is, is it worth learning it right now and using it for my migration project. i'll probably start out with writing the whole thing and build some kind of wrapper that makes it easy to switch to DBIC later on. all DBI code will be in that wrapper then. i'll see how that works out
18:19 xxtjaxx_ janus: s/fixed/got it/ but how do you use multiple placeholders with regex?
18:22 janus xxtjaxx_: same document, search for /23 :)
18:22 janus given that's what you mean...
18:22 janus but should be all in that doc
18:26 xxtjaxx_ $r->route('/:name', name => qr/[a-zA-Z]+/)  is best I could find... and in my case something like: $r->route('/json/states/:provi​der/:host/:service',provider=> qr/[^\/]/, host=>qr/[^\/]/, service => qr/[^\/]/); which doesnt work.
18:29 asarch joined #mojo
18:41 noganex joined #mojo
19:05 gryphon joined #mojo
19:07 rem_lex| joined #mojo
19:11 xxtjaxx_ janus: ^
19:18 PanzerBjorn joined #mojo
19:18 PanzerBjorn Wow that's a lot of Mojo in one room!
19:24 PanzerBjorn And it wouldn't be proper IRC if 99.5% of them were all idling. ;D
19:25 xxtjaxx_ How do you handle multiple parameters like $r->route('/:name/:bar/:baz') when you want special regex for them?
19:29 PanzerBjorn When I inflated from Lite to a full app, my under('/') => sub{} stopped working... It got converted into the $r->under format in the routing class file, but none of the processing that went on there goes on anymore...
19:30 PanzerBjorn Does under not work in full apps?
19:31 vervain I believe under is a lite helper, you may want 'bridges'
19:31 vervain http://mojolicio.us/perldoc/Moj​olicious/Guides/Routing#Bridges
19:36 PanzerBjorn Hmmm...
19:38 PanzerBjorn After developing a bunch of apps in Lite, I'm really not sure I understand how inflating to full apps works... Routing is so... different. What's the ->to() method all about? That never gets explained.
19:38 yakudza joined #mojo
19:40 sri PanzerBjorn: did you read the growing and routing guides?
19:40 PanzerBjorn I did.
19:41 sri ->to() is like the first thing the routing guide explains
19:41 PanzerBjorn I think a lot of the docs lack some explanation of core ideals and instead try to teach by example. Some of us don't learn by example well, esp when you're from the world of design patterns and core compsci.
19:43 sri so it's just not explained in the way you would like
19:43 vervain Time to bring up why we need a book again :-) LOL
19:43 PanzerBjorn It's not about liking ir disliking, it's about how information is assimilated and made useful in the brain. There are left-handed thinkers and right-handed thinkers.
19:44 * sri would love to write a book about mojolicious, but can't afford it
19:45 cfedde Of the various perl frameworks I find that Mojo is the easiest to understand.
19:45 sri if anyone else decides to write a book i'll gladly contribute a foreword though :)
19:46 PanzerBjorn I'm trying my damnedest to understand. Lite was actually very trivial to work with until my script had a few dozen templates and about 80 methods/subs.
19:46 PanzerBjorn Growing seemed like the answer, but I'm having growing pains. ;D
19:47 vervain PanzerBjorn: My advice is to take your time.  There will be hurdles.  Don't try to do it all at once either.  Experiment a lot.  It'll click soon enough.
19:48 PanzerBjorn Time's what I'm lacking though. I have 10 days to build a whole new service for a major commercial site in Mojo or we're in deep shite. If it goes well, we'll convert our whole site to Mojo, if not... Back to Perl/CGI and mod_perl2.
19:49 PanzerBjorn I was promised by someone who's close to the Mojo frontman that Mojo's so easy and fast to learn/use that you can write a full-featured commercial web app in 12 days (that was 2 days ago).
19:50 vervain That estimate doesn't sound like it has a learning curve built into it.
19:50 PanzerBjorn His claim was that there is no curve.
19:50 vervain <cough>
19:50 PanzerBjorn I'm beginning to think all he's ever done are Lite apps.
19:51 vervain Perhaps he was implying more of a wall? ;-)
19:51 PanzerBjorn If there's a wall, it only seems to be between Lite and full. =)
19:52 PanzerBjorn Lite was truly a breeze to work with. I got my core functionality up and running in a couple days using Lite. Now that I'm growing to app, confusion and lack of understanding are smacking me every turn I take in trying to conform to best-practice.
19:53 vervain Any possibility that sticking to the lite app would be the 'right-thing' to do?
19:53 PanzerBjorn (And having to restart hypnotoad every time I make a change was a shock too...)
19:53 vervain Even if maintenance is a bit difficult, and conversion is inevitable, is 10 days before deadline the right time to do it?
19:53 PanzerBjorn That's always a possibility, but it's already over 2800 lines in a single file.
19:54 vervain *nod* but if it works! :-)
19:54 PanzerBjorn 10 days left in proofing phase. I'd then have 2 weeks to polish it for Beta.
19:55 PanzerBjorn But at the end of the 10 days is the "show us that Mojo works for web apps and is just as fast and reliable as mod_perl2".
19:55 sri if you're developing with hypnotoad you're doing it wrong
19:55 PanzerBjorn Business presentation, decisions being made, etc. etc.
19:56 PanzerBjorn That's good to know, then. =) All the docs seemed to point to hypnotoad being "what full apps run on because morbo only does Lite".
19:56 vervain No no no
19:56 vervain morbo script/app.pm works for full apps
19:56 sri but with that deadline you get no sympathy from me, the material is dense, i wouldn't expect anyone to actually understand it in under a month
19:57 cfedde that which works is done.
19:57 PanzerBjorn I imagine some topics are denser than others though. I'm not doing anything insanely tricky or deep, just a simple web app that serves forms, processes forms, pushes and pulls data to a DB. I have all those libraries from our Perl/CGI and mod_perl2 code to lean on already.
19:58 sri not sure what you're arguing, i'm just saying that i didn't write those guides for learning with a deadline
19:58 PanzerBjorn (Already integrated into my Mojo app actually, beautifully. I love how nicely Mojo integrates with all things Perl already.)
19:59 PanzerBjorn I'm saying that for this demonstration and business decision, there shouldn't be anything dense to have to saturate. Just simple routing and rudimentary web-app.
20:02 chansen 10 days fot proofing and 2 weeks for beta? What kind of app are you building?
20:02 * chansen s/fot/for/
20:02 PanzerBjorn You know, the usual kind, management sets unrealistic deadline, you work over your entire winter break to make it happen even though it should be impossible, etc.
20:03 PanzerBjorn Not because you give a damn about the company or what management thinks but because it's a challenge and it's about damn time we moved on to something better than mod_perl2 and/or Perl/CGI.
20:04 chansen Perhaps now isn't the best time to move to Mojo if your timeframe is that short?
20:05 PanzerBjorn I'm an engineer, not a manager. =D These decisions don't get made by me, I just get a chance to prove things.
20:05 sri why set a deadline for something that isn't urgent? makes no sense
20:05 PanzerBjorn Because CES is in 3.5 weeks?
20:06 PanzerBjorn And the powers that be want a new web interface for customer information for CES?
20:06 chansen "new web interface"?
20:06 PanzerBjorn So that marketing can blast people with spam mail and tra-la-la about their elevator pitch, yadda yadda. This is the biz.
20:07 * sri goes to get some gingerbread
20:08 chansen I'm well familiarized with management pithes and development, but you haven't answered my question
20:08 PanzerBjorn Yes, a soul-sucking, information-gathering portal on the web where the company can try to lure people in to willingly provide their information and answer some questions and leave some feedback on what they've seen at the show, etc.
20:09 PanzerBjorn And some views for the marketing folks to extract it/manage it.
20:09 chansen where does the "new web interface" come in?
20:10 PanzerBjorn Perhaps I'm using marketing phraseology with "interface". Not a programming interface, a consumer interface.
20:10 PanzerBjorn This is a web app.
20:11 chansen So you need to switch framework inorder to get a new interface?
20:12 PanzerBjorn A very close friend of mine who does more web development than I do (it's his job, mine's doing client side desktop apps) who is apparently very close with whoever does Mojo (worked with him, is friends with him, drinks beer with him, etc.) promised me I could get this done in Mojo on-time. I'm just trying to make that happen.
20:13 vervain Sounds to me like your friend needs to come over to your place for the winter break. :-)
20:14 PanzerBjorn Yeah, he actually promised to be available on Skype over the break to help me... Well, until he revealed that he's only ever done Lite apps.
20:15 chansen PanzerBjorn: Switching frameworks requires investing time in learning, clearly something you don't have, sounds like you made a bade judgment in the decision to switch to a new framework with your timeframe
20:16 PanzerBjorn TTL is pretty awful in mod_perl2 and Perl/CGI, though. The extra cost of writing apps in those versus a real framework, I was convinced by others, would make up for the learning.
20:17 PanzerBjorn And if that's NOT true, then why bother using a framework at all?
20:17 vervain You're right, and it's good of you to take on so much pressure to champion what you know to be a good idea.
20:18 vervain Just be careful about biting off too much.  IOW stick with the lite app.  You know it's ugly but that doesn't matter.  What matters is that it works and gives you a chance to champion mojo.
20:18 vervain Successfully
20:19 vervain Of course once you are feature complete you can start the conversion to full app.
20:19 PanzerBjorn Well, where's the line of divergence between "half-assing it as long as it works" and "doing it right from the start because you'll never have time to do it right later"?
20:20 vervain Of course. But for you right now it seems that the single most important thing is success.
20:20 PanzerBjorn I've always been in the latter camp comp-sci-wise.
20:20 chansen PanzerBjorn: There is nothing wrong with MP (I have used it for many years and supported it in Catalyst), MP isn't a framework like Mojo, but if you are familiare with MP and considering your timeframe ...
20:21 PanzerBjorn Yeah, the server guys are really not happy about setting up reverse proxies in the Apache stack to hypnotoad either. They couldn't get Apache2::Mojo working (neither could I) so they're griping about this too. =/
20:22 chansen So, don't use Apache for reverse proxing (like most serious deployments ;)
20:22 PanzerBjorn As for MP, I don't actually know MP, I know it's used by the web guys (like I said I'm normally a desltop app dev, I just happen to know Perl and Apache and CGI) so it's an option.
20:24 PanzerBjorn Like with most companies, the server guys run things how they want to run things. All I can do is make recommendations. If you don't run hypnotoad in a separate process with a reverse proxy through Apache, then how can you run your Mojo? As I said before, Apache2::Mojo is broken. Appears it hasn't been maintained on CPAN in 3 years.
20:32 chansen Apache isn't the only open source or closed source software to run a reverse proxy on the market
20:34 PanzerBjorn Oh dear lord. I don't make those decisions. I work with what I've got based on the business. The server guys run Apache2, there's no nginx or FastCGI or whatever. Just Apache2. I'm a software engineer, I write code, I don't get to play with racks and servers and setting up Debian. Given their framework of Apache2, I have to make this work within that framework.
20:34 sh727 joined #mojo
20:35 sh4 joined #mojo
20:37 chansen Sounds like either your sever guys need some education or you need some communication between development and deployment (never worked for a company where there is no communication/discussion between development and deployment)
20:38 PanzerBjorn You've worked for some fantastic companies then, you should be proud.
20:39 PanzerBjorn Based on my experience, I don't think most companies work that way. At least not in the big business world.
20:44 chansen I guess our experience differs, I do contract work for a company that has 5+ billion USD revenue
20:45 PanzerBjorn Oh, are we slapping our dicks on the table now to prove who's got the biggest ePeen?
20:45 chansen Not at all you said, "At least not in the big business world"
20:46 PanzerBjorn I'm just curious, ya know, because it's awkward to start doing that if everyone in the room's not doing it.
20:46 * vervain slaps his teeny ePeen on the table!
20:47 PanzerBjorn Well, rather than banty about with numbers that are essentially meaningless, I'll point out that I've worked for Xerox for 3 years, IBM for 5 years, HP for 3 years, Wizards of the Coast for 2 years, Microsoft for 5 years and now at Logitech for 3 years. I wouldn't know a damn thing about big business and how it runs it's websites.
20:48 * chansen isn't sure if I should cry or laugh
20:49 PanzerBjorn So are you an average troll, or do you actually support Mojo and its purpose?
20:49 vervain Come 10 days from now will it be Mojo's learning curve or the ePeen contest that failed your project? :-)
20:50 PanzerBjorn Not sure, it might wind-up being it's piss-poor chatroom...
20:50 chansen If you had that kind of experience with different computer languages and frameworks, you would know ....
20:50 PanzerBjorn This is why places pay millions to use Oracle instead of open source.
20:51 PanzerBjorn At least they smile and blow you a kiss as they're raping you.
20:51 chansen PanzerBjorn: troll? Ask the Perl community if I'm a troll!! ;P
20:51 sri ok, STOP IT NOW!
20:51 sri both of you
20:51 sri end of discussion
20:52 * basic6 thanks sri
20:52 vervain *nod*
20:52 PanzerBjorn I came here for useful answers to genuine questions, not to be 'educated' on how to manage things well beyond my control. I'm trying to get Mojo acceptance within Logitech's web framework.
20:52 sri PanzerBjorn: final warning
20:53 PanzerBjorn That was aimed at YOU, @sri. Not part of the previous discussion.
20:55 marty joined #mojo
20:55 sri i don't care why it happened, i'm just stopping it
20:55 PanzerBjorn Can I get back to asking for help with some issues I'm having then?
20:55 vervain Please do
20:55 vervain I tried to help earlier
20:57 PanzerBjorn Given that Apache2::Mojo is broken and the server team has reservations about setting up reverse proxies, is there any alternative to getting Mojo running 'natively' in Apache2? Or are reverse proxies going to be the best approach? If the latter, is there anything I can offer the server team to assuage their concerns with performance?
20:59 PanzerBjorn Once again, I apologize if my terminology is a little off, this isn't my primary domain of knowledge.
20:59 sri Apache2::Mojo is garbage the author should have deleted from cpan years ago
20:59 sri http://mojolicio.us/perldoc/Mojol​icious/Guides/Cookbook#PSGIPlack
20:59 PanzerBjorn But I imagine that you can understand the jist of my question.
21:06 chansen How are you deploying your existing apps, as native ModPerl handlers or using ModPerl::Registry?
21:06 Britzel_ native mod_perl
21:07 PanzerBjorn Apparently they use both. I've only ever written Perl/CGI scripts for them so far that presumably get ModPerl2::Registry loaded. The distro of Ubuntu they're using though apparently has a POST data loss issue with Perl/CGI though.
21:07 PanzerBjorn Which was the biggest motivator for changing to Mojo.
21:08 PanzerBjorn (Biggest motivator for changing at all and considering other options. Mojo was my choice based on information from a friend of Glen Hinckle's)
21:09 sri glen is tempire
21:09 chansen using ModPerl::Registry is suboptimal, there is a lot of globals that has to be cleared and worked around
21:11 navi joined #mojo
21:11 navi1 joined #mojo
21:11 chansen Either fix Apache2::Mojo or choose another deployment engine/implementation
21:12 PanzerBjorn So between PSGI/Plack and Reverse Proxy, which is most performant? Because I know I'm going to get asked that.
21:13 PanzerBjorn (Also any down the road benefits to one or the other?)
21:14 chansen Regardless I think you will need a Reverse Proxy, but I think sri is more qualified to answer if any of the Mojo implementations is more performant than those in the Plack space
21:15 batman reverse proxy
21:15 batman i would kill apache and set up hypnotoad and varnish
21:16 chansen batman: varnish is a reverse proxy, the question is which is the most performant Mojo engine/daemon
21:17 sri mod_perl is something you choose when you don't have another choice
21:17 * sri would go with nginx + hypnotoad, but varnish is not a bad choice either
21:18 chansen Well if they are stuck on Apache for reverse proxying...
21:20 nic PanzerBjorn: As I understand it the main arguments for Plack are that you get to plug-in to a lot of ready-to-roll modules (plack middleware) and it somehow gives people a feeling of futureproofing
21:21 sri performance is relative, different apps have different needs, hypnotoad is a good general purpose solution, psgi servers like starman are good for min/maxing blocking apps
21:21 sh727 joined #mojo
21:21 anewkirk be nice if the functions in the template knkew how many arguments to expect
21:22 anewkirk ... then I could say % my $type = stash 'type' || 'foobar';
21:22 PanzerBjorn Okay so from the sounds of it I think I'm probably leaning reverse proxy. At least it's simple to setup without another layer, and hypnotoad seems to have nice features and be very lightweight.
21:23 batman the thing that kick ass with hypnotoad is that it can handle more than one request if you program non-blocking.
21:23 * sri suspects nginx will be the clear best choice in january, once they have full websocket support
21:23 nic and you get to do sockets
21:24 stephan48 is there a propper way do do chained layouts? f.e. a basic layout and then a second layout that inherit the first and add a nav
21:24 PanzerBjorn I prefer nginx on my personal servers. Trust me, I wish it were an option here.
21:24 sri stephan48: http://mojolicio.us/perldoc/Mojolicious​/Guides/Rendering#Template_inheritance
21:24 nic PanzerBjorn: I haven't read back yet; would you be using apache2 for reverse proxy?
21:25 PanzerBjorn Oh, along similar lines I had a question about looped template rendering. If I'm pulling a bunch of records from a DB and I want to format them all using a line template (a le PHP) is there a way to do that in Mojo?
21:25 PanzerBjorn nic: Yes, Apache2 reverse proxy.
21:26 nic there's nothing wrong with apache2 for that, esp if that's what your systems guys are comfortable with
21:27 nic PanzerBjorn: For the template question, will you be using .ep templates?
21:27 PanzerBjorn Yeah, I am using .ep templates right now.
21:27 nic answer is yes then
21:27 nic you have the full power of perl, so you'd be struggling to find something it can't do
21:28 PanzerBjorn At the moment I'm formatting each record using raw HTML into a Mojo::ByteStream->new() to keep it from getting translated.
21:28 sh727 joined #mojo
21:28 PanzerBjorn Well, rather, I am building the lines in my $sth loop and then I stash them in a Mojo::ByteStream->new() to be consumed by the template. I assume there's a better way.
21:29 nic Do you pull the records back as one resultset
21:30 nic (eg via ->selectall_arrayref(<some sql>, {Slice => {}}) )
21:31 nic .ep templates let you do loops, with some templating inside
21:31 PanzerBjorn I can, but in this case I'm looping over them live.
21:32 PanzerBjorn I can adapt the code to work for whatever scenario Mojo would like in order to process each line.
21:32 nic I'm struggling to think of a neat way of doing it live
21:32 nic (can probably be done but i've had a long day :) )
21:33 nic if you do like wot I've put above, your resultset is in one variable, and it's eezypeezy to loop through them within your template
21:34 nic ByteStream is a fine technique, but with a simple loop you won't even need that
21:34 PanzerBjorn Just would be nice to get the HTML all in templates is all. ;)
21:35 nic yes, the way I'm suggesting (but probably failing to clarify) has everything within one template
21:46 * sri wonders if anyone has recently used the MOJO_HOME environment variable
21:46 * batman has never used it
21:46 sri home detection seems pretty much fool proof now that Plack sets $0
21:49 good_news_everyone joined #mojo
21:49 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/QKLvvQ
21:49 good_news_everyone mojo/master 5c9ce4d Sebastian Riedel: modernized PSGI deployment recipe a bit
21:49 good_news_everyone left #mojo
21:53 nic perl -MMojar::Mysql::Connector="cnf,reade​r_localhost,schema,Orders,-dbh,foo" -E'say join qq{\n}, main->foo->tables'
21:54 nic That tables() method could clearly return a fair bit of data; should it therefore return an arrayref instead of an array?
21:54 nic (I've never made up my mind which to use)
21:55 nic arrays are easier to work with like in the above where I don't need @{ }
21:55 good_news_everyone joined #mojo
21:55 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/RVdk7Q
21:55 good_news_everyone mojo/master a3e9deb Sebastian Riedel: tweaked PSGI deployment recipe some more
21:55 good_news_everyone left #mojo
21:55 nic but folk generally use refs when passing bigger values around
21:56 PanzerBjorn Hmmm, having some trouble getting a bridge working.
21:57 navi left #mojo
21:58 PanzerBjorn $r->bridge('/' => sub { my $self = shift; $self->stash( some => 'value'); return 1; }); # not working
21:58 batman PanzerBjorn: you're not using the bridge in that chunk of code.
21:59 PanzerBjorn No error in the code until I try to access <%= $some %> in template.
21:59 batman $r2 = $r->bridge(...); $r2->get(...);
21:59 PanzerBjorn Oh, so bridges only act on sub-controllers?
22:00 PanzerBjorn Is there a way in my base/root module to just stash some globals for the whole app to use?
22:00 PanzerBjorn That would eliminate the need to even use a bridge. I was just doing that using an 'under' in Lite.
22:00 batman sub-controllers?
22:01 PanzerBjorn Sorry, sub-modules.
22:01 batman $app->defaults(foo => 123);
22:02 PanzerBjorn Does that go inside of sub startup { ... } ?
22:03 batman yes
22:03 batman sub startup { $_[0]->defaults(foo => 123); }
22:05 chansen PanzerBjorn: I wish you luck on your deadline, I'll seen yu a few swedish beers if you manages it! (let me know of your address: )
22:05 PanzerBjorn Awesome, that fixed my issue batman, thanks. =)
22:05 batman screw deadlines. let's drink beer instead :)
22:05 PanzerBjorn chansen: Thanks. I think I'm manage to get it done. ;)
22:06 batman (deadlines are an illusion)
22:06 lammel2 joined #mojo
22:07 chansen PanzerBjorn: Excellent, just let me know which kind of beer you enjoy =)
22:07 PanzerBjorn Honestly most of the work is done for me, I just have to pull it all into one place. The HTML/CSS design is made by the UI team, I'm re-using libraries from the web team, and the server guys are doing deployment. I jyst put it in the right place to work.
22:07 PanzerBjorn I like reds and stouts. =)
22:07 _xaka_ joined #mojo
22:08 PanzerBjorn (And wire-up all of the form data and interface the DB, easycakes)
22:18 ObseLeTe joined #mojo
22:18 PanzerBjorn Does anyone here use Komodo Edit/IDE for editing epMojo files?
22:19 alexeiras joined #mojo
22:21 PanzerBjorn My Komodo highlighting is kind of... Stupid. Everything in <%= ... %> tags is getting put into a bright grey background making it almost impossible to read. Apparently that behavior's not something I can alter through the UI.
22:24 vervain Does a bridge have access to post params?  $self->param('foo') works inside my bridge for get but not post.
22:30 hesperaux joined #mojo
22:31 lammel2 joined #mojo
22:35 buu vervain: Works for me!
22:35 vervain *nod* It's worked for me before too... I've got something very squirrely going on.
22:47 PanzerBjorn Gorgeous. =) My Lite app is now working as a full app. Now I can start adding more to it.
22:47 vervain Sweet!  Congrats!
22:48 PanzerBjorn Oops, spoke too soon, one route's still not working. I got a little over-excited there.
22:49 vervain Problems with your ePeen again :-)
22:49 PanzerBjorn Different ePeens for different technology. ;)
22:49 PanzerBjorn My Mojo ePeen is but a babe... a wee babe.
22:50 vervain Babe with the power
22:50 PanzerBjorn I like how Mojo is smart enough to look for templates in a variety of different names/locations, but my stupidity fooled it. ;D lol
22:52 vervain My issue is related to my nginx proxy dishing out 301s all the time. :-/
22:53 PanzerBjorn Okay, let's say I have a Controller name MyApp::Post and it has a method that calls a ->render('form') - where should the form.html.ep file be placed in the tree?
22:54 PanzerBjorn I figurted it would go in templates/post/form.html.ep but Mojo is looking for it as templates/form.html.ep or as templates/post/post.html.ep
22:54 vervain ->render()
22:55 vervain ^h Sorry... that's not what I thought
22:55 PanzerBjorn I want that controller to render different templates though. The templates I have right now are 'form', 'confirm' and 'complete'.
22:55 wircus__ joined #mojo
22:55 batman____ joined #mojo
22:56 batman____ joined #mojo
22:56 wircus__ joined #mojo
22:56 vervain *nod*  does ->render('post/form') work?
22:56 PanzerBjorn That did the trick, thanks. =)
22:56 vervain np
22:57 PanzerBjorn Still trying to get the hang of what can/will go where in which parts of the controller/render/routing.
22:58 Averna joined #mojo
22:58 PanzerBjorn There, no my page flow and routing are all hooked up and working. 4realz this time.
22:58 PanzerBjorn Thanks again for the help, think I'm finally going to get some lunch now.
23:01 vervain argh... 'location /app {' != 'location /app/ {' in nginx proxy configs.
23:10 GabrielVieira2 joined #mojo
23:13 sinkovsky joined #mojo
23:18 tempire I wish I could push onto a hash
23:19 * wircus__ finished reading scrollback.
23:19 wircus__ I see y'all have had an exciting day =)
23:23 tempire deputy sri++
23:24 wircus__ joined #mojo
23:24 batman____ joined #mojo
23:24 vervain Sheriff shirley(sic)
23:25 * sri salutes
23:27 tempire I have a location for mojocon 2014
23:28 tempire based on this: http://midnite-munchies.com/
23:28 tempire COOKIES ON DEMAND
23:33 vervain Cookie Delivery is cool but Breakfast Delivery is what's really missing from the world. :)
23:36 tempire I see no difference
23:37 mattastrophe joined #mojo
23:40 vervain You'd have loved my house this morning then.  There were over 300 cookies covering the horizontal surfaces.

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