|Subject:||AUTOLOAD is not called when DESTROY is missing in 5.20.1 - but this is not documented|
|To:||perlbug [...] perl.org|
|Date:||Sat, 25 Apr 2015 08:16:00 +0200|
|From:||Gabor Szabo <gabor [...] szabgab.com>|
In earlier versions of perl if AUTOLOAD is defined in a module but DESTROY is not defined, the AUTOLOAD would be executed when the object goes out of scope and one would have had to add an empty DESTROY to eliminate the problem caused by this.
In 5.20.1 this does not seem to be the case. In 5.20.1 it seems if AUTOLOAD won't be called when the object goes out of scope.
However I think the documentation in perlobj still indicates the old behavior
and I could not find any indication in the perldelta docs that would imply this change.
So I wonder if this was an unplanned change in perl,
a lack of documentation, or something else.
The issue was discussed here as well: