Introduction
Always check the return codes of system calls. Good error messages should go to STDERR, include which program caused the problem, what the failed system call and arguments were, and (very important) should contain the standard system error message for what went wrong. Here's a simple but sufficient example:
opendir(D, $dir) or die "can't opendir $dir: $!";
Line up your transliterations when it makes sense:
tr [abc] [xyz];
The above should be aligned since it includes an embedded tab.
Think about reusability. Why waste brainpower on a one-shot when you might want to do something like it again? Consider generalizing your code. Consider writing a module or object class. Consider making your code run cleanly with
use strict
and-w
(oruse warnings
in Perl 5.6) in effect. Consider giving away your code. Consider changing your whole world view. Consider... oh, never mind.Be consistent.
Be nice.
Links
This link should just include one word: Pod::LaTeX
This link should include the text test
even though it refers to Pod::LaTeX
: test.
Standard link: Pod::LaTeX.
Now refer to an external section: "sec" in Pod::LaTeX
Lists
Test description list with long lines
- Some short text
-
Some additional para.
Nested itemized list
Second item
- some longer text than that
-
and again.
- this text is even longer and greater than 40 characters
-
Some more content for the item.
- this is some text with something across the 40 char boundary
-
This is item content.
And this should be an enumerated list without any cruft after the numbers or additional numbers at all.
Escapes
Test some normal escapes such as < (lt) and > (gt) and | (verbar) and ~ (tilde) and & (amp) as well as < (Esc lt) and | (Esc verbar) and / (Esc sol) and > (Esc gt) and & (Esc amp) and " (Esc quot) and even α (Esc alpha).
For blocks
Some text that should appear.
Some more text that should appear
Back to pod.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 353:
Expected text after =item, not a number