mirror of
https://github.com/perlbot/perlbuut
synced 2025-06-07 16:35:40 -04:00
localize some perlvars to prevent people from doing weird shit
This commit is contained in:
parent
e85e082848
commit
72eb3c71ee
1 changed files with 9 additions and 4 deletions
13
lib/eval.pl
13
lib/eval.pl
|
@ -401,11 +401,16 @@ Biqsip biqsip 'ugh chan ghitlh lursa' nuh bey' ngun petaq qeng soj tlhej waqboch
|
||||||
my @os = qw/aix bsdos darwin dynixptx freebsd haiku linux hpux irix next openbsd dec_osf svr4 sco_sv unicos unicosmk solaris sunos MSWin32 MSWin16 MSWin63 dos os2 cygwin VMS vos os390 os400 posix-bc riscos amigaos xenix/;
|
my @os = qw/aix bsdos darwin dynixptx freebsd haiku linux hpux irix next openbsd dec_osf svr4 sco_sv unicos unicosmk solaris sunos MSWin32 MSWin16 MSWin63 dos os2 cygwin VMS vos os390 os400 posix-bc riscos amigaos xenix/;
|
||||||
|
|
||||||
{
|
{
|
||||||
local $^O = $os[rand()*@os];
|
local $^O = $os[rand()*@os];
|
||||||
no strict; no warnings; package main;
|
no strict; no warnings; package main;
|
||||||
# my $oldout;
|
# my $oldout;
|
||||||
$code = "use $]; use feature qw/postderef refaliasing lexical_subs postderef_qq signatures/; use experimental 'declared_refs';\n#line 1 \"(IRC)\"\n$code";
|
do {
|
||||||
$ret = eval $code;
|
local $/;
|
||||||
|
local $\;
|
||||||
|
local $,;
|
||||||
|
$code = "use $]; use feature qw/postderef refaliasing lexical_subs postderef_qq signatures/; use experimental 'declared_refs';\n#line 1 \"(IRC)\"\n$code";
|
||||||
|
$ret = eval $code;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
select STDOUT;
|
select STDOUT;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue