Tag Archives: Perl
23
Nov

weaken … XS version of Scalar::Util

weaken is only available with the XS version of Scalar::Util Every time we upgrade Perl on our CentOS box we get this message.  The fix is very simple .  Re-install Scalar::Util via CPAN.  For some reason the bindings are not updated and the proper version needs to be re-registered with the Perl modules directory. The [...]

Continue Reading →
11
Jun

Using Common Sense With Perl

Since I was recently doing Perl work on the Boomerang project, I figured it would be a good time to finally try out common::sense, a CPAN module that, according to the documentation, will save a tree _and_ a kitten when you use it.  I like trees and cats, so Hell, why not try it then? [...]

Continue Reading →
04
Jun

Perl Regular Expression \K Trick

Regular expressions are a frequently useful tool in our profession, and Perl is probably the most advanced arena for testing your ability to wield regexes.  That’s because Perl has the most feature-rich regular expressions out there (that I know of anyways).  There’s always some new trick to learn about Perl regexes. Case in point: \K.  [...]

Continue Reading →
11
Feb

Changing Directories More Easily

Here is something I have in my Bash config that I have found useful these days. It defines a command called up that lets me move up a given number of directories. For example, up 2 is the same as cd ../.., and up 4 is cd ../../../.., and so on. function up() { cd [...]

Continue Reading →
08
Nov

Perl Source Code Profiler

Here is a nicely done perl profiler that we’ve used in the past to help us with our Perl work.  You may find this useful as well.  Rather than describe the tool, we’ll let the detailed documentation handle that for us. SYNOPSIS # profile code and write database to ./nytprof.out perl -d:NYTProf some_perl.pl # convert [...]

Continue Reading →
08
May

Postgres::Handler

Our local updated perl docs. These enhanced notes will be published on our next push to CPAN. Name Postgres::Handler – Builds upon DBD::Pg for advanced CGI web apps Description Postgres::Handler builds upon the foundation set by DBI and DBD::Pg to create a superset of methods for tying together some of the basic interface concepts of [...]

Continue Reading →