Error "Subroutine redefined at line 359" no correctly ignored
See https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30717#c8
perl -cw outputs:
$VAR1 = 'Subroutine dt_from_string redefined at Koha/DateUtils.pm line 58.
Subroutine output_pref redefined at Koha/DateUtils.pm line 269.
Subroutine format_sqldatetime redefined at Koha/DateUtils.pm line 360.
Subroutine flatpickr_date_format redefined at Koha/DateUtils.pm line 392.
Koha/DateUtils.pm syntax OK
';
The line Subroutine flatpickr_date_format redefined at Koha/DateUtils.pm line 392.
goes thru the following regex:
s/at .* line .*$// for @errors;
And this regex is too generic. It already the last two letters at from the subroutine name!
So it leaves: Subroutine flatpickr_date_form
Which is no longer removed by the redefined regex..
s/^Subroutine .* redefined $// for @errors;
Since redefined was already eaten.
Edited by joubu