in reply to "localise" package's our variables? They affect other packages (e.g. File::Temp::KEEP_ALL)

Does it really look at the value of the global variable at the moment of deletion, or at the moment of creation?

If the latter, the following should work:

$File::Temp::KEEP_ALL = 1; my $tmpdir = File::Temp::tempdir(); $File::Temp::KEEP_ALL = 0;

Sorry, too busy to properly test at the moment.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
  • Comment on Re: "localise" package's our variables? They affect other packages (e.g. File::Temp::KEEP_ALL)
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: "localise" package's our variables? They affect other packages (e.g. File::Temp::KEEP_ALL)
by ikegami (Patriarch) on Oct 10, 2024 at 16:16 UTC

    Both.