in reply to Conflict with INIT block is not an error?
why is it not a syntax error?In my opinion, it is a syntax error on 5.12. When I add a print to your try.pl file, I get the same error message as you do, and it does not print "foo". On 5.8.8, I get no error message and it does print "foo".
#!/usr/bin/perl use strict; use MyPackage; MyPackage::close_cnx(); print "foo\n";
As an aside, you can promote warnings to errors like this:
use warnings FATAL => 'all';
|
|---|