in reply to Re^2: Meaning of Maintanability and Functionality in Coding Perl
in thread Meaning of Maintanability and Functionality in Coding Perl

My mistake was in my word selection. I said "The most important thing to comment" when I meant to say "The most important thing to document" (like in the paragraph header). Those words are obviously not interchangeable. It is possible to document something with means other than comments. For example, the use of assertions are an excellent mean of documentation. I didn't mention the use of assertions specifically because I considered it an implementation detail and I was speaking at the conceptual level.

Looking at assertions further, I don't think they are always the best choice. For example,
($^O eq 'MSWin32') or die "Platform not supported";
could be replaced with
($^O eq 'MSWin32') or warn "Platform not supported";
depending on whether the unit is known to use features specific to Win32 (die), or whether the possibly of running the unit on another platform was simply not considered (warn). This would be consistent with Perl's spirit of flexibility and permissivity. It's not always necessary to know that something won't work; it's often sufficient to know when it might not work.