Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Date::Manip and taint mode

by Corion (Patriarch)
on Jun 17, 2020 at 06:29 UTC ( [id://11118175]=note: print w/replies, xml ) Need Help??


in reply to Date::Manip and taint mode

Look at @INC. If you populate it from the outside, for example by setting PERL5LIB, taint mode will ignore that.

The best approach is to set up @INC from within your script, using use lib;.

Replies are listed 'Best First'.
Re^2: Date::Manip and taint mode
by Anonymous Monk on Jun 17, 2020 at 13:46 UTC
    Corion, could you please elaborate on that? How, exactly, is taint-mode triggering the library not being loaded, an how, exactly, does your suggestion address it? No question that you surely are right ... but to an outsider with less knowledge than you have it isn't easy to see why.

      If you don't have PERL5LIB set in your environment, the problem is somewhere else.

      The variable @INC is the search path where Perl looks for modules. You can inspect the module search path by running perl -V on the command line.

      The value of @INC is influenced by the environment variable PERL5LIB, see perlrun and perlvar on @INC.

      The link I posted explains that the environment variable PERL5LIB is ignored under taint mode.

      The module lib is a convenient way to set up @INC (which PERL5LIB also sets) from within a Perl program.

        "The link I posted explains that the environment variable PERL5LIB is ignored under taint mode." Bingo ... didn't know that.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11118175]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-25 09:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found