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…)
Archive for the ‘Perl’ Category
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.
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!
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…)
In Perl, when you get an error, there are magic globals that the interpreter sets to the value of that error. If you’re going to do any other work before reporting the error, save those variables! Work almost got this right… (more…)
Found a section that annoyed me in perlsyn today, in the documentation for the foreach loop: (more…)
I’ll be teaching a very informal class on Perl to a couple of folks I know. We’ve got two days scheduled, and I’ve suggested they get chromatic’s Modern Perl as a ‘textbook’. I plan on covering what variables are, how program flow works, functions, and objects via Moose. I’ll also discuss installing Perl on Windows and Linux. What am I forgetting? (more…)
I just installed Perforce (what a hassle!) and discovered that it won’t authenticate to the local Unix accounts out of the box. The nice folks at Perforce let you call an external trigger, and provide a complex sample that will handle talking to Active Directory, but don’t have one do handle ordinary Unix passwd access. (more…)
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…)