File tree Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ sub write_makefile
50
50
' Test::More' => 0.45,
51
51
' File::Temp' => 0.13,
52
52
' parent' => 0.221,
53
+ ' Test::Taint' => 1.06,
53
54
);
54
55
55
56
WriteMakefile( VERSION => ' 0.9917' ,
Original file line number Diff line number Diff line change
1
+ # !perl -T
2
+ use Test::More qw/ no_plan/ ;
3
+
4
+ use Test::Taint;
5
+ use version;
6
+
7
+ taint_checking_ok();
8
+ my $v = ' v1.2.3' ;
9
+ taint($v );
10
+ tainted_ok($v );
11
+ my $v2 = version-> parse($v );
12
+ isnt(" $v2 " , ' ' , ' Correctly parsed the tainted string' );
13
+ tainted_ok($v2 );
14
+
15
+ my $vs = " $v2 " ;
16
+ is $v2 , ' v1.2.3' ;
Original file line number Diff line number Diff line change @@ -968,7 +968,11 @@ Perl_vstringify(pTHX_ SV *vs)
968
968
if (svp ) {
969
969
SV * pv ;
970
970
pv = * svp ;
971
- if ( SvPOK (pv ) )
971
+ if ( SvPOK (pv )
972
+ #if PERL_VERSION_LT (5 ,17 ,2 )
973
+ || SvPOKp (pv )
974
+ #endif
975
+ )
972
976
return newSVsv (pv );
973
977
else
974
978
return & PL_sv_undef ;
You can’t perform that action at this time.
0 commit comments