A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Perl MooseX::Params::Validate gotcha

This error:

Parameter #1 ("1") to Some::Module::a_method did not pass the \'checking type constraint for Different::Module\' callback\n at /some/path/to/some/file/or/other.pm line 42

(but the parameters passed in are actually all correct)

...it could mean you forgot to shift off $self. pos_validated_list doesn't detect $self like validated_list and validated_hash do.

How to capture linux "time" output

Pipe time output into a file like this:

{ time ls; } 2>time.output

Don't forget the semicolon!

(source)

Update your git fork from the upstream project

Once:
git remote add upstream https://github.com/otheruser/repo.git

Every time:
git fetch upstream
git checkout master # your fork
git merge upstream/master

# Do not do this if your repo has more than one user:
git reset --hard upstream/master
git push --force origin master

(source)

How to paste a table into a thunderbird email with correct formatting

How:
  • Copy table from web page
  • Paste into OpenOffice Calc (Excel)
  • Copy from Calc
  • Paste into email
done.