END {
if ($run and eval { require DynaLoader; 1 }) {
- for (@DynaLoader::dl_librefs) {
- next unless defined;
- undef $_ if DynaLoader::dl_unload_file($_);
- }
+ my @rest;
+ DynaLoader::dl_unload_file($_) and push @rest, $_ for @DynaLoader::dl_librefs;
+ @DynaLoader::dl_librefs = @rest;
}
}
=head1 COPYRIGHT & LICENSE
-Copyright 2008 Vincent Pit, all rights reserved.
+Copyright 2008-2009 Vincent Pit, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.