]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/blobdiff - lib/Test/Valgrind.pm
Nits in Test::Valgrind::import description
[perl/modules/Test-Valgrind.git] / lib / Test / Valgrind.pm
index 5f7414f8d7ad94a570709b1fb4cfc81edeaf2a78..1b4aa78a287fbdf4ebc3d2252f8967cb6bceb5a5 100644 (file)
@@ -9,11 +9,11 @@ Test::Valgrind - Test Perl code through valgrind.
 
 =head1 VERSION
 
-Version 1.00
+Version 1.01
 
 =cut
 
-our $VERSION = '1.00';
+our $VERSION = '1.01';
 
 =head1 SYNOPSIS
 
@@ -189,8 +189,8 @@ sub analyse {
 
 =head2 C<import [ %options ]>
 
-In the parent process, L</import> calls L</analyse> with the arguments it received itself - except that if no C<file> option was supplied, it tries to pick the highest caller context that looks like a script.
-When the analyse finishes, it exists with the status that was returned.
+In the parent process, L</import> calls L</analyse> with the arguments it received itself - except that if no C<file> option was supplied, it tries to pick the first caller context that looks like a script.
+When the analyse ends, it exits with the status that was returned.
 
 In the child process, it just C<return>s so that the calling code is actually run under C<valgrind>.
 
@@ -273,8 +273,20 @@ sub import {
  });
 }
 
+=head1 VARIABLES
+
+=head2 C<$dl_unload>
+
+When set to true, all dynamic extensions that were loaded during the analysis will be unloaded at C<END> time by L<DynaLoader/dl_unload_file>.
+
+Since this obfuscates error stack traces, it's disabled by default.
+
+=cut
+
+our $dl_unload;
+
 END {
- if ($run and eval { require DynaLoader; 1 }) {
+ if ($dl_unload and $run and eval { require DynaLoader; 1 }) {
   my @rest;
   DynaLoader::dl_unload_file($_) or push @rest, $_ for @DynaLoader::dl_librefs;
   @DynaLoader::dl_librefs = @rest;