Legacy Fix: version->parse existiert erst seit 5.10.1. Vorher muss version->new-...
authorSven Schöling <s.schoeling@linet-services.de>
Tue, 21 Sep 2010 09:16:17 +0000 (11:16 +0200)
committerSven Schöling <s.schoeling@linet-services.de>
Tue, 21 Sep 2010 09:16:17 +0000 (11:16 +0200)
SL/FCGIFixes.pm

index 2bd312c..47393aa 100644 (file)
@@ -4,6 +4,7 @@ use strict;
 
 use Encode;
 use FCGI;
+use version;
 
 # FCGI does not use Perl's I/O layer. Therefore it does not honor
 # setting STDOUT to ":utf8" with "binmode".  Also FCGI starting with
@@ -23,7 +24,7 @@ use FCGI;
 # that current I/O operations should be raw.
 
 sub fix_print_and_internal_encoding_after_0_68 {
-  return if version->parse($FCGI::VERSION) <= version->parse("0.68");
+  return if version->new("$FCGI::VERSION")->numify <= version->new("0.68")->numify;
 
   my $encoder             = Encode::find_encoding('UTF-8');
   my $original_fcgi_print = \&FCGI::Stream::PRINT;