why I love and hate perl
Jun. 12th, 2009 06:16 pmif you have something like this:
in a perl script, but you don't have this:
at the top, it fails, but not in any way that's predictable, or easy to debug. In this case, I only got *vmx files in odd numbered directories.
yea, yea, any decent programmer knows (or should know) that, but yeesh! No errors, no warnings, just bizarre behavior.
On the other hand, most stuff I write works the way I expect and doesn't require debugging once I re-learn the syntax, so maybe it doesn't suck that much.
- if ( glob "$local_vm_path/$os_info{$os_dns}{path}-$ins/*.vmx" ) {
in a perl script, but you don't have this:
- use File::Glob ':glob';
at the top, it fails, but not in any way that's predictable, or easy to debug. In this case, I only got *vmx files in odd numbered directories.
yea, yea, any decent programmer knows (or should know) that, but yeesh! No errors, no warnings, just bizarre behavior.
On the other hand, most stuff I write works the way I expect and doesn't require debugging once I re-learn the syntax, so maybe it doesn't suck that much.