Subject: | AUTOLOAD should ignore DESTROY methods |
The AUTOLOAD in File::Find::Iterator doesn't ignore methods named
'DESTROY'. At minimum this causes annoying error output; it also may end
up mucking up an actual DESTROY method if somebody tries to get fancy
with inheritance.
One line patch:
--- File/Find/Iterator.pm 2008-01-11 15:19:32.000000000 -0500
+++ File/Find/Iterator.pm.ORIG 2008-01-11 15:17:52.000000000 -0500
@@ -93,7 +93,6 @@
sub AUTOLOAD {
my ($self) = @_;
my ($pack, $meth) =($AUTOLOAD =~ /^(.*)::(.*)$/);
- return if $meth eq 'DESTROY';
my @auth = qw(dir filter map statefile order);
my %auth = map { $_ => 1 } @auth;
unless ($auth{$meth}) {
Note that Class::Iterator has the same problem...