unless (eval "use $mod $version ()") {
should be
unless (eval "use $mod $version (); 1") {
since use doesn't have a (documented) return value.
In reply to Re^2: checking module version
by ikegami
in thread checking module version
by diamantis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |