Let's say you have InterestingObjects, a hash map from strings to objects. You could say InterestingObjects['foo'].andand['bar'].andand != '', but you might do better to rethink control flow, and reframe your problem, because there might be an easier way than always talking about variables that might not exist that have unknown properties. That looks like you're breaking encapsulation.
Actually, I don't have a problem with Perl 5/Catalyst http://www.catalystframework.org/ for a Startup, as long as you have several people quite good at it. If you know what you're doing, the main problem is finding good startupish Perl devs.
I confess that I don't understand your example. I'm not breaking encapsulation, I'm just verifying that a variable is defined (avoids 'variable not defined, can't call can' error), that it is an object with the method of interest (avoids 'no such method' error), etc.
In other words - I am doing a type check that its a valid object of the class I want with a non-null value on a field that should never be null. Happens all the time. This is more easily defined once in the class in a more reasonable object system. But Perl 5 without Moose has no such thing.
Which would seem to parallel the article. I could just assume that $object->foo will work, but that doesn't work out too well as code grows, because if I want my code to work or at least to easily be fixed, I have to check sanity everywhere possible.
But maybe it's not a win and you never want to turn off (most?) assertions in dynamic languages.
(For non-Perl people, Smart::Comments are a neat way to e.g. allow runtime checks that are easy to turn off. Like C's assertions.)
if (defined($foo) and $foo->can('bar') and $foo->bar ne '')
I really relate to the article, because I deal with Perl 5 sucking all day long. Perl 6 has types. Moose has types. I can't use either, and so I end up writing really lengthy code doing ad hoc type checks all over the place.
Types are important to have when you need them, and you would move to using more and more of them on a more mature system like twitter at this point, but I prefer that they be optional. Moose objects and Perl 6 give me that option but don't require it, and thats nice.
Does Ruby do anything like that? Thinking about Ruby for my next project.