Skip to content

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

@Rumperuu

Description

@Rumperuu

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/:

  • Admin/Transactions.pm;
  • Admin/Users.pm; and
  • Root.pm.

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:

  • t/admin/transactions.t;
  • t/admin/user.t; and
  • t/basic.t.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions