Archive for December, 2010

Can’t really override open()?

Saturday, December 11th, 2010

A question came up at work the other day, if you could override the Perl open() function.  There’s many possible uses for this, but work’s was simple: we wanted a log of all files accessed during a program run.  The program is large, complex, and uses many modules.  An override of open() would let us record the file and open mode, then call CORE::open.

We couldn’t do it.  After a second look, I still can’t do it.  Not for all cases, anyway. (more…)

Cool Tools To Know

Saturday, December 4th, 2010

chromatic mentioned something in the preface to his book Modern Perl that I had been looking for but hadn’t yet found.  He then went on to mention a couple of other things which were just plain neat.  I knew about one of them, but not the second and thought they were both great ideas and thought I’d try and get them wider attention. (more…)