You might want to read the GOTCHAs section of Parse::Recdescent too. It has a formula for guaranteeing that either the whole thing parses, or nothing at all parses--assuming that the input string should be completely parsed. Anyway, if added to your code, you could add these two productions like this so that where is the new toplevel production:
where : condition eofile
eofile : /^\Z/
If you don't need to parse the whole input, you could make eofile an appropriate end marker for the parsed input. Adding <error> directives in the right places in your other productions may also help.