FHEM Forum

FHEM => Sonstiges => Thema gestartet von: Nestor am 21 Juni 2019, 23:00:05

Titel: sub trim() twice defined in 88_WEBCOUNT.pm:39 and 99_Utils.pm:128
Beitrag von: Nestor am 21 Juni 2019, 23:00:05
I got following error in log:
PERL WARNING: Subroutine trim redefined at ./FHEM/88_WEBCOUNT.pm line 41.
Titel: Antw:sub trim() twice defined in 88_WEBCOUNT.pm:39 and 99_Utils.pm:128
Beitrag von: Christoph Morrison am 22 Juni 2019, 10:55:13
Zitat von: Nestor am 21 Juni 2019, 23:00:05
I got following error in log:
PERL WARNING: Subroutine trim redefined at ./FHEM/88_WEBCOUNT.pm line 41.

Hi Nestor,

thank you for your input. But there is no need to be concerned: It's just a warning and they happen any time you reload FHEM.

Please add "[SOLVED]" to the topic for this thread and close it.
Titel: Antw:sub trim() twice defined in 88_WEBCOUNT.pm:39 and 99_Utils.pm:128
Beitrag von: Nestor am 22 Juni 2019, 17:37:15
Why don't you import the function from 99_Utils?
It seems they do exactly the same.
Titel: Antw:sub trim() twice defined in 88_WEBCOUNT.pm:39 and 99_Utils.pm:128
Beitrag von: Christoph Morrison am 23 Juni 2019, 13:59:13
Zitat von: Nestor am 22 Juni 2019, 17:37:15
Why don't you import the function from 99_Utils?
It seems they do exactly the same.

I'm not the maintainer, it's sachag. Feel free to contact him directly
Titel: Antw:sub trim() twice defined in 88_WEBCOUNT.pm:39 and 99_Utils.pm:128
Beitrag von: Nestor am 25 Juni 2019, 09:03:53
The sub trim() in 88_WEBCOUNT.pm can be removed since 99_Utils.pm is auto-loaded via fhem.pl
Patch attached.
Titel: Antw:sub trim() twice defined in 88_WEBCOUNT.pm:39 and 99_Utils.pm:128
Beitrag von: Christoph Morrison am 25 Juni 2019, 18:19:03
I took maintainership from him. Will publish a reworked version soon. Thank you, Nestor.
Titel: Antw:sub trim() twice defined in 88_WEBCOUNT.pm:39 and 99_Utils.pm:128
Beitrag von: Nestor am 29 Juli 2019, 15:54:30
Any update?
This simple cleanup patch seems not be checked in.
Titel: Antw:sub trim() twice defined in 88_WEBCOUNT.pm:39 and 99_Utils.pm:128
Beitrag von: Christoph Morrison am 30 Juli 2019, 14:22:25
Zitat von: Nestor am 29 Juli 2019, 15:54:30
Any update?
This simple cleanup patch seems not be checked in.

Sorry, did the changes but forgot to commit it to the subversion repository. Will be updated tomorrow morning at 08:00.