Yes, and the space is equally "useless" because require"$file.pm" works just fine. That doesn't mean I'm going to drop either of them.
The "; 1" is part of the best practice. It may not change the effect of this particular code, but it means I don't have to worry about whether the preceeding code might return a false value rather than dieing. It also tells the reader that I'm testing whether eval succeeded not whether the eval'd code returned a true value (which also makes it clearer why I'm using eval at all).
- tye
In reply to Re^5: eval "require $class" seems wrong (1)
by tye
in thread eval "require $class" seems wrong
by rvosa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |