http://qs321.pair.com?node_id=11118221


in reply to Re: Date::Manip and taint mode
in thread Date::Manip and taint mode

Nothing but a newline is printed here (FreeBSD 12.1-STABLE r358002, perl 5.30.3, /bin/sh & zsh) for ...

$ perl -T -MDate::Manip::DM6 -E 'say $Date::Manip::VERSION'

I get the same output -- 6.81 -- for both of ...

$ DATE_MANIP=DM5 perl -T -MDate::Manip -E 'say $Date::Manip::VERSION' $ DATE_MANIP=DM6 perl -T -MDate::Manip -E 'say $Date::Manip::VERSION'

... without any error messages. For me $ENV{ENV} is undefined in both shells; I have not explicitly (un)set it myself.

After explicitly making ENV an environment variable for the exercise, error messages are certainly reproducible. So something is stuffing ENV for you and possibly for OP. Wait ...

Ah. I see I did set ENV to shell configuration file path in long unused profile for Bourne shell (sh) & in bash{rc,_profile} for bash.

Replies are listed 'Best First'.
Re^3: Date::Manip and taint mode
by Anonymous Monk on Jun 18, 2020 at 10:08 UTC

    Interesting, stuffing up ENV brings the error to Linux too.

    $ ENV=blah perl -T -MDate::Manip -E 'say $Date::Manip::VERSION' ERROR LOADING MODULE: Date::Manip::DM6 at /usr/share/perl5/vendor_perl +/Date/Manip.pm line 35.

    I'm still on Bourne shell as I just set up a FreeBSD VM to mess around with kqueue.

      I've never run into this (though I don't use taint mode very often). I just ran the same command (setting ENV=blah on linux) and it ran without error. I'm investigating to see if I can fix Date::Manip to not suffer from this taint issue.