Three times in the last few months I’ve had the “DBIC or raw DBI” discussion. People have told me that they don’t use DBIC because raw DBI is better. And each time, the person promoting DBI in the discussion has used an argument that boils down to “DBIC is probably useful for people who don’t […]
Perl School 2
Yesterday was the second Perl School course. Once again it was at Google Campus and once again it was on Modern Perl for Non-Perl Programmers. The big difference this time though was that people were paying £30 a time to attend. And that did make a difference. While the previous (free) version sold out in […]
Learning from Bad Code
I’ve written before about Linux Format’s habit of sharing badly written Perl code. I thought things were improving, but in the new edition (November 2012, issue 163) they’re back to their old tricks. This time it’s a tutorial called “Starfield: Learn new languages”. In this tutorial Mike Saunders writes similar starfield simulation code in C, […]
Perl School 3
The second Perl School course is just under four weeks away (and there are still tickets available) but it’s time to start looking ahead. The third Perl School is going to be on 8th December. Like the others, it will be at Google Campus. But this time the subject will be slightly different. The first […]
A Cautionary Tale

I can never remember exactly how Time::Piece works. But that’s ok because I have documentation.
1 2 |
$ perldoc Time::Piece No documentation found for "Time::Piece". |
Huh?
1 2 3 4 5 6 7 8 9 10 |
$perl -v This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-thread-multi ... $ corelist Time::Piece Time::Piece was first released with perl v5.9.5 $ perl -MTime::Piece -E'say $Time::Piece::VERSION' Can't locate Time/Piece.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .). BEGIN failed--compilation aborted. |
So Time::Piece has been in the Perl core since 5.9.5. I’m running Perl 5.14.2 but I don’t have Time::Piece installed. After ten minutes or so of head-scratching it came to me.
1 2 3 4 5 |
$ sudo yum install perl-core Loaded plugins: langpacks, local, presto, refresh-packagekit [ stuff snipped ] ---> Package perl-Time-Piece.x86_64 0:1.20.1-212.fc17 will be installed [ more stuff snipped] |
I’m running Fedora. The Fedora […]