Pear-Trading / Foodloop-Server

1 stars 0 forks source link

‘Subroutine name is a homonym for builtin function’ #152

Open Rumperuu opened 3 years ago

Rumperuu commented 3 years ago

When running Perl-Critic at the stern level (see #146), ‘Subroutine name is a homonym for builtin function’ errors (severity 4) are thrown for the index(), read() and delete() subroutines defined in the following files within lib/Pear/LocalLoop/Controller/:

For some reason though, renaming these subroutines (to idx(), get() and del()) causes the following tests to fail due to receiving undef rather than HTTP 200 responses:

This is despite the fact that the exact same changes were successfully made to every other file in the project, and there is no obvious reason why either these files or their tests should behave differently.

For now, the Subroutines::ProhibitBuiltinHomonyms policy is disabled for these subroutines, but this should be considered a temporary workaround.