You made two errors. You'd immediately see that if you tried to print the contents of $v.
- You forgot the '$' in front of the variable's name
- You need to separate the $prereq from the two colons, or Perl will treat them as the name of the variable $VERSION from the package "prereq".
This fixes it:
my $v = "\$$prereq\::VERSION"; # LINE 115
At least, now I see the printed result:
Found DBI version 1.15
without any warning. (I don't have the other module.)