Subject: | Class::HPLOO v0.23 install issue on Perl v5.22 or higher |
Class::HPLOO uses defined @arrary which has been deprecated since Perl v5.22 which is causing module install issue.
please refer https://stackoverflow.com/questions/52021890/perl-module-classhploo-v0-23-install-issue-2 for more details.
Issue Details:
There are three issues with Class::HPLOO (which as I noted before, hasn't been updated since 2005) that make it fail with modern perls.
1. the obsolete construct defined (@array) is used once in lib/Class/HPLOO.pm' and three times inlib/Class/HPLOO/Base.pm`. This construction has been prohibited since v5.22
2. The current directory (.) is no longer in @INC (as of v5.24, I think). So the lines in test.pl like
require "test/classtest.pm"
either all need to be rewritten as
require "./test/classtest.pm"
or an easier fix is to put
use lib '.';
at the top of the script.
3. There is a regular expression in lib/Class/HPLOO.pm, line 1077, with an "unescaped left brace"
$sub =~ s/(\S)( {) (\S)/$1$2\n$FIRST_SUB_IDENT $3/gs ;
{ is a regex metacharacter, and since v5.22 it has been illegal to use it in a context where it is not indicating a quantity. The fix, as the error message suggests, is to escape it.
$sub =~ s/(\S)( \{) (\S)/$1$2\n$FIRST_SUB_IDENT $3/gs ;