in reply to Is this code secure, can I test it on my machine?

For this I need to check for the appearance of use lib and @INC in the code.

Impossible.

my $x = 'INC'; unshift @$x, ...;

Replies are listed 'Best First'.
Re^2: Is this code secure, can I test it on my machine?
by szabgab (Priest) on May 24, 2010 at 09:50 UTC
    Nice. Can you make this work with strict as well?
      use strict; use warnings; use Data::Dumper; sub foo { use constant foo1 => $^H = 0; push @{reverse 'CNI'}, 'hello'; } foo(); print Dumper \@INC;
      Sure:
      no strict 'refs'; unshift @{ 'INC' }, ...;
      Similar,
      unshift @{ $::{INC} }, ...;
      unshift @{ *INC }, ...;

      These might be considered the same as @INC, or maybe not:

      unshift @::INC, ...;
      unshift @main::INC, ...;