Subject: | Devel::NYTProf tries to write a nytprof.out even if start=no is set (and dies if directory not writable) |
Consider this small script:
use 5.014;
use strict;
use warnings;
use autodie;
unlink 'nytprof.out' if -e 'nytprof.out';
BEGIN {
$ENV{NYTPROF} = 'start=no';
}
require Devel::NYTProf;
say "OH NOE" if -e 'nytprof.out';
__END__
OH NOE
Says "OH NOE" each time I run it.
That's very annoying, because in my use case, the current directory isn't writable, and I want to supply a different file name later with DB::enable_profile($filename), but it already dies on the require.