Archive for the ‘Perl’ Category

PBP: 003 Subroutines and Variables

Sunday, May 11th, 2014

The item in this category is not to separate the parenthesis from a function call by a space.  This is sort of the converse of the last practice, and needed to help show a function call from a control structure.

I find this good advice, too, for the reasons given.

PBP: 002 Keywords

Saturday, May 10th, 2014

The PBP suggests putting a space between a keyword and the opening parenthesis, to help differentiate it from a subroutine call.
This is a good idea, for good reasons.

PBP: 001 Bracketing

Thursday, May 8th, 2014

The PBP suggests the venerable K&R bracer style.  I don’t have a strong feeling on this.
I have used several styles over the years, and mildly prefer the Allman style, which the book calls BSD.  I find the GNU style of half-indents bizarre.

(more…)

Examining the book “Perl Best Practices”

Thursday, May 8th, 2014

Perl Best PracticesMost people who use Perl seriously have seen Damian Conway‘s book Perl Best Practices.  It was, and is, an important book and has a lot of interesting discussions in it.

I don’t find all the suggestions in PBP to be useful, though.  Since I’ve just been thinking about them, I thought I’d write them up.  Why not go through them all?
(more…)

Module Name Conflict with Config.pm

Wednesday, May 7th, 2014

At $WORK I am writing a utility to read data from a data source and write a fairly complex set of configuration files for a set of tools we use.  It’s past Sysadmin 101 and into Advanced System Administration.  I’ve also been given permission to write clean new Perl, and am doing several interesting things like running a code coverage analysis and keeping the code approved by perlcritic –brutal.  I’m also using a GUI IDE to develop in. (more…)

Earlier Presentation on Catalyst

Saturday, July 27th, 2013

The first presentation I gave for the Silicon Valley Perl user’s group was on Catalyst; they had just had presentations on Dancer and Mojolicious and I thought it might be nice to show the more complex tool that everyone seemed trepidatious about using.  Certainly a focus of the other talks was “See how easy it is!  No unneeded stuff!” which was cool.  But, at every turn, I kept thinking, “Wait, you had to write that?  Catalyst would have done that for me…” (more…)

DBIx::Class Talk at SVPerl

Friday, June 7th, 2013

I was the speaker again at this month’s Silicon Valley Perl meeting.  This is because my talk about Catalyst wound up mentioning Template Toolkit and DIBx::Class so much they wanted to hear more.  I went and gave them more.

Here are the slides I used for the talk.  There was no sample code this time – I used that from the examples, which means you can get it all from CPAN.  Links are in the slides, and questions are welcome.

Template Toolkit Talk at SVPerl

Thursday, April 4th, 2013

I gave a talk on Template Toolkit at the Sillicon Valley Perl meeting. I used these Template Toolkit Slides as I talked. Except I think I corrected the typos when I got home. =)

It’s a fun group, and I always enjoy going, even when I’m the speaker.

Logitech Media Manager and Perl 5.16

Sunday, March 17th, 2013

I have some Logitech Squeezeboxes.  Some of the older Slim Devices ones, too, actually, but they work together well.

The nice people at Logitech have dropped the Squeezebox line to make a new cloud-based product.  Not my cup of tea.

Problem: The Logitech Media Server software is old and balky, and installing it is a pain on new systems, because it includes binary versions of Perl modules.

Solution: Install perlbrew for the squeezebox user, install a supported Perl version there, and tweak the #! lines to use that squeezebox user’s perl install.

The right perl works fine, and since it’s in ~squeezebox, it won’t get screwed up when SuSE upgrades.

WAY easier than trying to fix the idiosyncratic Logitech Media Server software!

 

Why I Dislike Autodie

Tuesday, October 23rd, 2012

Many people have suggested I use autodie. I have never been interested in the functionality it provides, and don’t use it. I think there’s primarily two reasons why that is. I might know a way to address one of them, but it’s tricky. (more…)