|
So it doesn't seem to be widely documented and I suspect it's a bit of a dirty hack, but I've discovered a fairly easy to enable cross-schema joins with DBIx::Class and Catalyst - change your schema class's __PACKAGE__->table definition to use the fully qualified name:code:
code:
code:
code:
|
# ¿ Feb 25, 2010 08:22 |
|
|
# ¿ May 22, 2024 04:55 |
|
How's this?code:
|
# ¿ Mar 8, 2010 12:55 |
|
Thought that might be the case. In that case, try assigning to undef, it looks weird but should work in recent versions of Perl (a quick Googling didn't tell me which version made it syntactically valid):code:
Mario Incandenza fucked around with this message at 19:15 on Mar 8, 2010 |
# ¿ Mar 8, 2010 18:55 |
|
Not really; update() doesn't take any arguments other than column values, so it's not really possible to specify a join condition as part of your update. Plus not all databases support joined updates (SQLite doesn't, anyway). However, there's nothing from stopping you from getting direct access to the underlying $dbh inside your resultset class and writing some SQL that does what you need.
|
# ¿ Mar 30, 2010 02:35 |
|
5.12.0 is out Lots of changes and new stuff, perl5120delta here Mario Incandenza fucked around with this message at 08:07 on Apr 13, 2010 |
# ¿ Apr 13, 2010 08:04 |
|
Anybody had much experience with the various distributed worker libraries like Gearman, TheSchwartz, and Cantella? Any advice to offer, or other libraries that would be worth trying out while I'm at it?
|
# ¿ Apr 30, 2010 10:06 |
|
CGI::App's great for simple web apps with only a few different pages. Once you pass ~5 screens, or you need to glue together a bunch of different models, start looking at Catalyst. Stick to the same template system and ORM across the board if you can help it, Template::Toolkit and DBIC are usually good enough for most people's needs. Both CGI::App and Catalyst support FastCGI easily - Catalyst does it out-of-the-box, CGI::App has a helper module on CPAN.
|
# ¿ Jun 3, 2010 16:51 |
|
Marzzle posted:Any other criticism is appreciated. I literally learned to program this stuff a week ago so I am sure there's other points I am off on.
|
# ¿ Jul 6, 2010 02:49 |
|
which just iterates through bash's $PATH variable so why not cut out the middle-man and do it yourself?code:
code:
|
# ¿ Jul 22, 2010 16:13 |
|
Well, calling functions indirectly and tightly coupled like that is kinda asking for trouble, but here's how to do it (even when using strict):code:
|
# ¿ Sep 22, 2010 07:59 |
|
Just read about 5.13.7's keys(), push(), pop() etc now accepting refs as valid containers, noice. That was one of the few things that still seems to bug me about Perl's syntax. e.g. say() foreach keys $obj->returns_hashref()
|
# ¿ Dec 5, 2010 16:46 |
|
just use Date::Manip, it parses everything
|
# ¿ Dec 10, 2010 03:26 |
|
Native traits are nearly as cool as Moose itself, inlining them was a great idea.
|
# ¿ Dec 24, 2010 14:20 |
|
code:
|
# ¿ Mar 30, 2011 23:19 |
|
Any OpenSSL gurus around? I'm trying to get a client-side x509 cert from Thawte working but I'm getting 'sslv3 alert certificate unknown' bubbling up through Net::SSLeay and IO::Socket::SSL. Apparently they added an intermediary certificate to their chain last year and now it seems Perl isn't properly walking up the chain of trust.
|
# ¿ Apr 4, 2011 23:44 |
|
Mario Incandenza posted:Any OpenSSL gurus around? I'm trying to get a client-side x509 cert from Thawte working but I'm getting 'sslv3 alert certificate unknown' bubbling up through Net::SSLeay and IO::Socket::SSL. Apparently they added an intermediary certificate to their chain last year and now it seems Perl isn't properly walking up the chain of trust.
|
# ¿ Apr 5, 2011 20:19 |
|
They're both right. Technically if the arguments to system() ended up containing metacharacters for whatever reason (malice, ignorance, bad luck) then it could do something dangerous, but if the scripts are not publicly accessible and the box is sufficiently locked down, then it's less of a concern.
|
# ¿ Apr 6, 2011 19:08 |
|
qntm posted:
code:
|
# ¿ May 18, 2011 01:41 |
|
Not really related but tchrist's recent UTF8 post is pretty fantastic: http://stackoverflow.com/questions/6162484/why-does-modern-perl-avoid-utf-8-by-default/6163129#6163129
|
# ¿ Jun 6, 2011 20:30 |
|
Devel::REPL has a bunch of tab completion plugins, I can't imagine it would be difficult to hack something up for that.
|
# ¿ Jun 26, 2011 17:56 |
|
code:
Mario Incandenza fucked around with this message at 19:25 on Jul 6, 2011 |
# ¿ Jul 6, 2011 19:22 |
|
The most recent sub imported with a use statement will be the one that's called. No errors or warnings will be emitted by Exporter:code:
Perl does have a 'subroutine undefined' warning but it only shows up when the parser (compile-time or run-time) encounters a named sub block that matches an existing one in the current package: code:
|
# ¿ Jul 12, 2011 23:40 |
|
wntd posted:BEGIN { $^I = ".bak" }
|
# ¿ Dec 19, 2011 00:36 |
|
We deal with the shortage by churning through as many voice and face-to-face interviews as possible. Even then we can't hire quickly enough, it's hard to find good Perl dudes BTW we're literally always hiring, so if you're a good Perl dude and are willing to relocate, send me a PM.
|
# ¿ Aug 4, 2012 11:43 |
|
prefect posted:Relocate to where?
|
# ¿ Aug 6, 2012 17:17 |
|
So, who's going to be at YAPC::EU next week?
|
# ¿ Aug 16, 2012 08:35 |
|
Shoulda just used IO::Pty to run an instance of lynx and feed it some keystrokes, problem solved!
|
# ¿ Dec 17, 2012 09:23 |
|
5.18.0 is out, some cool new things there, might want to hold back on upgrading in production though as some CPAN modules are broken under the new version ATM due to the hash fixes made by Yves (which has caused some butthurt on p5p, sigh).
|
# ¿ May 20, 2013 21:18 |
|
Most Perl hackers use hashes for pretty much everything, they're way more flexible than arrays. I only use arrays when I specifically need them (i.e. a numerically indexed, ordered list). If you're writing Perl, learn to love hashes.
|
# ¿ May 29, 2013 10:06 |
|
The main thing to keep in mind when reading Perl Best Practices (and to be fair it's mentioned in the preface) is that the book's contents are not to be taken as the gospel truth. As welcome to hell said, about half of what it recommends you should avoid outright (inside-out objects, anyone?). Also, Higher-Order Perl is probably one of the better Perl books ever written, and is available for free from the author, so check that out too.
|
# ¿ Jun 25, 2013 19:08 |
|
Current Work Status: Discovered one of our most important bits of code is a Frankensteinian mish-mash of Moose and Moo, because a contributor tried to s/Moose/Moo/ but got it wrong and left half of the relevant roles untouched
|
# ¿ Jul 3, 2014 12:04 |
|
Yeah, Moo will load Moose roles just fine (though using both libraries simultaneously is pretty weirdo).
|
# ¿ Jul 3, 2014 19:14 |
|
BTW, use cpanminus if you're not already, it makes things much simpler (and easier). It supports lots of super-cool features like installing from an arbitary local path/URL/git repo.
|
# ¿ Jul 14, 2014 23:28 |
|
|
# ¿ May 22, 2024 04:55 |
|
uG posted:
|
# ¿ Mar 31, 2015 09:28 |