I was bugged by the fact that this works on Linux but not FreeBSD so I spent some time poking at a VM.
What I think is going on is that Date::Manip::TZ tries to get the time zone in a few different ways and finally uses shell commands. I think it probably uses files on Linux but winds up running a shell command on FreeBSD. Since $ENV{ENV} is defined on FreeBSD, we get...
The line that provokes the error is$ perl -T -MDate::Manip::DM6 -E 'say $Date::Manip::VERSION' Insecure $ENV{ENV} while running with -T switch at /usr/local/lib/perl +5/site_perl/Date/Manip/TZ.pm line 844.
open(IN,$cmd |") || return ();
I believe the answer is that you need to clean up $ENV{ENV} but I suppose that might also be something that Date::Manip::TZ should be doing.
If worse comes to worst, there seem to be a lot of ways to configure the time zone so maybe you can find one that avoids the shell.
FWIW, the old version 5 interface doesn't have this problem.
$ DATE_MANIP=DM5 perl -T -MDate::Manip -E 'say $Date::Manip::VERSION' 6.81
2020-06-21 Athanasius changed "Data::Manip::TZ" link to "Date::Manip::TZ".
In reply to Re: Date::Manip and taint mode
by Anonymous Monk
in thread Date::Manip and taint mode
by byfr81
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |