Solve almost any datetime need with Time::Piece
How to parse, print, format, compare and do math with datetimes in Perl
Read it
Generating UML and Sequence Diagrams
Imagine yourself in a meeting with management. You’re about to begin your third attempt to explain how to process online credit card payments. After a couple of sentences, you see some eyes glazing over. Someone says, “Perhaps you could…
Read it
Managing Rich Data Structures
As a Perl beginner, I wrote many scripts that created text files to store snippets of data. Eventually I had hundreds of little text files in a data directory, each one holding one piece of information in the form…
Read it
Testing Files and Test Modules
For the last several years, there has been more and more emphasis on automated testing. No self-respecting CPAN author can post a distribution without tests. Yet some things are hard to test. This article explains how writing Test::Files gave…
Read it
Document Modeling with Bricolage
Previous Perl.com articles have reviewed where Bricolage fits into the universe of content management systems and worked through Bricolage installation and Bricolage configuration. Now it’s time to go through the steps required to model the structure of an existing…
Read it
An Introduction to Test::MockDBI
Prelude How do you test DBI programs: Without having to modify your current program code or environment settings? Without having to set up multiple test databases? Without separating your test data from your test code? With tests for every…
Read it
Massive Data Aggregation with Perl
This article is a case study of the use of Perl and XML/RDF technologies to channel disparate sources of data into a semi-structured repository. This repository helped to build structured OLAP warehouses by mining an RDF repository with SAX…
Read it
Symbol Table Manipulation
Having almost achieved the state of perfect laziness, one of my favorite modules is Class::DBI::mysql. It makes MySQL database tables seem like classes, and their rows like objects. This completely relieves me from using SQL in most cases. This…
Read it
Perl Code Kata: Testing Databases
Testing code that uses a database can be tricky. The most common solution is to set up a test database with test data and run your tests against this. This, of course, requires bookkeeping code to keep your test…
Read it
Embedded Databases
The expression “Embedded Database” requires an explanation. A “database” is an application that allows the targeted retrieval of stored data - a log-file is not a database. By “embedded” I mean a database that does not run in a…
Read it
Perl's Special Variables
One of the best ways to make your Perl code look more like … well, like Perl code - and not like C or BASIC or whatever you used before you were introduced to Perl - is to get…
Read it
Making Dictionaries with Perl
When you woke up this morning, the last thing you are likely to have thought is “If only I had a dictionary!” But there are thousands of languages on Earth that many people want to learn, but they can’t,…
Read it
Simple IO Handling with IO::All
One of my favorite things about Perl is how flexible it is. When I don’t like something about the language, I don’t let it get me down. I just change the language! The secret to doing this lies in Perl…
Read it
Perl Slurp-Eaze
One of the common Perl idioms is processing text files line by line: while( <FH> ) { do something with $_ } This idiom has several variants, but the key point is that it reads in only one line…
Read it
Database Programming with Perl
An Embarrassing Confession I’d like to think that I’m a reasonably decent Perl programmer now. I’d like to think that I have a good grasp of how to solve relatively common problems in Perl. But, you know, it hasn’t…
Read it
Identifying Audio Files with MusicBrainz
It’s quite possible to end up with digital music files that don’t have good information about what they are. Files that don’t have ID3 information can rely on paths for album information, for example, and that is lost easily. M3U…
Read it
Adding Search Functionality to Perl Applications
Introduction to Searching Usually, when building an application, a lot of thought goes into how the data is entered and updated, rather than finding it again. Finding data is an afterthought, especially when developing with a small dataset. If…