sethd.org
this is not the blog you're looking for

Resume
LinkedIn

RECENT ENTRIES

Perl and Inline POD
Vim Articles (by Damian Conway)
Interesting Modules 2010-03-05
Dave Rolsky Is Right
Interesting Modules 2010-03-02
Perl Call Semantics
Interesting Modules 2010-03-01
Interesting Modules 2010-02-27
Cleaning Namespaces
Ranting About Yahoo! Mail
Interesting Modules 2010-02-24
Interesting Modules 2010-02-23
Testing A Database Intensive Application
Excellent Post About Exceptions
Interesting Modules 2010-02-22
Interesting Modules 2010-02-21
Setting Up A Windows Computer: Part 2
Los Angeles Boat Show
Interesting Modules 2010-02-19
Interesting Modules 2010-02-17
First Day at New Gig
My Favorite Hike
Initial Picasa Experience
Interesting Modules 2010-02-15
Interesting Modules 2010-02-14
Interesting Modules 2010-02-13
Leaving Oversee
Universal CityWalk
The SheevaPlug and MythTV
Interesting Modules 2010-02-11
Lucky Strike at LA Live
Log Analysis Tools: Part 1
Protocol Buffers and Perl
Perl Profiling
Blosxom and plugins
Module::Build is useful for more than bundling
Test::Builder::Module: Why am I just learning about this?
Downtown Los Angeles
Navigation
ArcLight Cinemas
This Hiking Trail
Sports Blogging
Apache 1.3 End-Of-Life
A Silly Conceit: Perl Is Not Serious
Mar 07, 2010

Perl and Inline POD

I've had co-workers that never wrote POD, and that was probably the worst. But the next worst are the people that inline their POD. I really cannot stand inline POD. Apparently I am not alone. Mike Friedman expresses it at least as well as I can so I'll leave it at that.

Well, almost. He says one odd thing:

  If someone's looking at your code, it's because they need more information 
  than the documentation or interface itself can provide.
I don't think this is even half true. I often look at Perl code that has perfectly good (and non-inline) POD. Almost always because I'm less interested in the public interface than I am interested in how that interface was written. What fun is software development if all you do is work with the public interface of blackbox libraries? It's much more interesting to see what's going on behind the scenes and actually learn something new, right?

Tags: , , .
[p] Posted @ 11:08 by Seth

Mar 05, 2010

Interesting Modules 2010-03-05

NEXT: I don't know that I will ever use this module, but it is interesting. Provides for interesting method dispatching scenarios such as calling all DESTROY's in the inheritance tree.

Net::Amazon::EC2: Perl interface to the Elastic Compute Cloud (EC2) environment. I'm not certain if this is a competitor to the Amazon Perl API or if it somehow complements it.

Tags: , , .
[p] Posted @ 11:22 by Seth

Mar 02, 2010

Interesting Modules 2010-03-02

XML::Compile::SOAP: A real replacement for SOAP::Lite.

Tags: , , .
[p] Posted @ 11:03 by Seth

Mar 01, 2010

Perl Call Semantics

Matt S. Trout has an interesting blog post about Perl call semantics. There are a number of things in there I was unaware of. Of particular interest to me is that this works:

  my $undef = undef;
  my $code = sub { "foo" };
  $undef->$code; # returns "foo"
Apparently when the right hand side of the '->' is a coderef there is no method lookup. Very interesting.

Tags: .
[p] Posted @ 12:38 by Seth


Interesting Modules 2010-03-01

POE::Filter::HTTPD::Chunked: As a big proponent of POE I thought this looked interesting. A drop-in replacement for POE::Filter::HTTPD that can deal properly with chunked encoding.

Template::ShowStartStop: Inserts comments in the generated output to show where one template ended and a new one begins. It overrides Template Toolkit's Template::Context to do this.

Tags: , , .
[p] Posted @ 12:09 by Seth

Feb 27, 2010

Interesting Modules 2010-02-27

UNIVERSAL::require: A module that gets around the silly bareword requirements for the builtin require() sub.

IPC::Cmd: An API to run external commands. A wrapper around system() I would guess, but very nice looking.

Tags: , , .
[p] Posted @ 23:13 by Seth


Cleaning Namespaces

A good introductory article about Perl namespaces and how they can become dirty. Not surprisingly it mostly talks about how to properly use namespace::clean.

Tags: , .
[p] Posted @ 12:50 by Seth

Feb 24, 2010

Interesting Modules 2010-02-24

SQL::Translator: Translate the DDL from one schema type (say, Oracle) to another (say, PostgreSQL). It can also be used to translate a schema to something completely different, such as a YAML file. One particularly nice feature is the ability to translate a schema to code. An example of this would be translating a MySQL schema to Class::DBI code. Introductory documentation is available.

Sub::Override: Instead of writing this:

  undef (local *Some::sub);
  local *Some::sub = sub { ... };
You would write:
  Sub::Override->new('Some::sub', sub { ... });
The scoping rules are (mostly) the same and it is more readable. Very useful for tests.

Tags: , , .
[p] Posted @ 12:09 by Seth

Feb 23, 2010

Interesting Modules 2010-02-23

Data::Random: Generate random words, characters, numbers, date, time, .... Seems like this would be very useful for testing.

Fey::ORM::Mock: An attempt at a replacement for DBD::Mock. The author suggests it is better but does not eliminate all the problems with DBD::Mock. Likely requires that you use Fey::ORM as your object to relational mapper.

Tags: , , .
[p] Posted @ 13:52 by Seth


Testing A Database Intensive Application

Yet another good blog post today. This one covers the trials of writing good unit tests for an application that interacts with a database. The comments are definitely worth a read too.

Tags: , , .
[p] Posted @ 13:42 by Seth


Excellent Post About Exceptions

Apparently using exceptions as flow control can be very bad. That blog post has some concrete numbers on the performance hit of die()/eval() versus return() and versus eval{return()}.

I've often wondered about this but had never followed up by performing some simple tests. The absolute worst case of this I have ever seen was when I was benchmarking the protobuf-perl library. At that time Moose was capturing a confess() by Class::MOP. It was doing this thousands of times for even simple tasks. As you can see if you read this thread getting rid of the confess() was a big win (although protobuf-perl was still slow). I wonder if getting rid of the eval would have proven to be even more beneficial? As I wrote about here I will likely never know.

Tags: , .
[p] Posted @ 13:18 by Seth

Feb 22, 2010

Interesting Modules 2010-02-22

autodie: Replace functions with ones that succeed or die with lexical scope. Very useful if you are dealing with a large script or you don't want to do all the die() code yourself in a new script.

Tags: , , .
[p] Posted @ 11:52 by Seth

Feb 21, 2010

Interesting Modules 2010-02-21

indirect: Lexically warn about using the indirect object syntax. This module seems very useful for catching difficult to find bugs. This blog post gives a compelling case for its use.

namespace::autoclean: Keep imports and functions out of your namespace.

namespace::clean: Keep imports and functions out of your namespace. Allows a bit more control as compared to namespace::autoclean.

Carp::POE: Carp adapted for use with POE. May be interesting.

Module::CoreList: Generate lists of core modules shipped with Perl. This module is maintained by the Perl 5 Porters. I can see this being useful for package dependency generation.

Tags: , , .
[p] Posted @ 12:53 by Seth

Feb 19, 2010

Interesting Modules 2010-02-19

Cache::FastMmap: Yet another very good IPC module.

Forks::Super: Never used this module but it does appear to do some handy things. If you are familiar with POE it is probably better to just use that.

Tags: , , .
[p] Posted @ 23:46 by Seth

Feb 17, 2010

Interesting Modules 2010-02-17

Devel::Caller: a more powerful caller().

Tags: , , .
[p] Posted @ 16:53 by Seth


This site uses the very simple and easy to use blosxom blogging software.


Advanced Search

OTHER SITES