Tag archives for: technical

Of Red Hats and Mints

Part 1: A Brief History of Desmond, as it Relates to Linux

I've been using Linux since about 1998, when I started my first "real" job at PCI Geomatics. At the time, most of PCI's workstations ran a version of Red Hat Linux. The standard setup revolved around FVWM and Emacs.

I did not find Linux easy. But it was fun.

I installed Linux for the first time in 2000, on a computer I built from scratch (my first one). It was Red Hat 6.2. That installation was not what you'd call "smooth", but I did eventually get it working.

Read more

Error Handling in Perl

Okay, this won't be the most exciting entry in the world. There are several different ways of logging or recording errors and warnings in perl, and I find I easily get confused. So this entry will serve as a very, very basic reference for me. Other people may find it useful. Or not.

Core Perl

die LIST

Taken from the Perl 5.10.0 documentation:

Outside an eval, prints the value of LIST to STDERR and exits with the current value of $! (errno). If $! is 0 , exits with the value of ($?>> 8) (backtick command status). If ($?>> 8) is 0, exits with 255. Inside an eval(), the error message is stuffed into $@ and the eval is terminated with the undefined value. This makes die the way to raise an exception.

Read more

Scoping in Perl

I just read a very clear tutorial on Perl scoping mechanisms:


I often get bitten by scoping issues but unfortunately (or fortunately?) it's usually easier in Perl to work around your problem than to understand the reasons behind it.

One part I found interesting was the section labelled "The Current Package" which explains the use of the package command in Perl. There is a tendency (or, at least, I have a tendency) to conflate the use of the Perl package command and, say, the use of the Java package declaration because they are often used to achieve the same effect, namely the separation of namespaces, and also because, by convention, they are used in a syntactically similar way. Because of this, it is easy to forget that the package command in Perl is just that: a command. You can call it from anywhere, multiple time from the same file even, and the effect is simply to change the current package - which in itself doesn't have a huge effect on how you write your code, just the way to access your variables.

Read more