Data::ObjectDriver is a great ORM. It's easy to configure and easy to use, but not as powerful as DBIx::Class (which isn't that easy to learn and I actually prefer using a wrapper instead of "native" DBIx::Class, but that's another story). There is one major thing I missed with Data::ObjectDriver: JOINing foreign tables.
English
I wrote about Perl variable declaration secrets recently, but there's much more. Perl has a very simple way for passing variables to subs which should be called later.
Perl has a very flexible variable concept. One might use different namespaces, called "packages" or use all variables global without defining them. Another way to use variables is more Cish where every single variable must be declared before it's used.
Perl has a great asynchronous library: AnyEvent. (There may be even more great asynchronous libraries, but it decided to use AnyEvent.) I recently had to lookup a lot of different hostnames and didn't want to do it sequentially (because every single DNS server might be down or wait until the reply is received).
Perl supports various tests for file and directory states. Most are identical to their bash test siblings, but some additional are supported, like -M, -A and -C.
DKIM may be called as PGP successor: PGP has been used by many people for signing their emails at a time when mostly technical related people had been using the internet. Today, few people still use PGP to sign their emails, but email servers took over this part using a technology called DKIM.
Not all files on a webspace should be accessible by anybody on the Internet. There are many tutorials for protecting directories or files with a password using a .htaccess file, but some files need to be on a webspace, which shouldn't ever be served by the webserver. This is a simple how-to-protect them tutorial.
PHP calls it associative array, JavaScript calls it object and - in the eyes of other (older) languages like C, BASIC, Pascal or Perl - all of them are wrong. An array has some items which may be addressed using their position in the list, but only a Perl hash has named keys. A hash is basically an (unordered) list of items where each item has a key and a value - but that value may have one of many different states.
Everybody working with web technologies knows 200, 302, 404 and 500 - the most famous HTTP status codes. Many people also heard of 301, the permanent brother of 302, but there's another child in the 3xx family which is rarely known or used: The magical 303.
Here are three SQL queries and one simple challenge: Order them by speed assuming that city has an index.
1. SELECT city, SUM(inhabitants) FROM population GROUP BY city
2. SELECT city, SUM(inhabitants) FROM population GROUP BY city ORDER BY city
3. SELECT city, SUM(inhabitants) FROM population GROUP BY city ORDER BY city DESC
I'm currently upgrading from Ubuntu 9.04 to Ubuntu 12.04, a long process as every upgrade does only one step. This is the price you pay for skipping all updates of the last years. It's even slower since I moved my root filesystem to a RAID6.
Drei Tage ohne neue Posts obwohl mehr als genug bloggenswertes passiert ist. Wie kommts? |
Three days without new posts - what happend? A lot of things happend and many of them want to be blogged, but they aren't. |