Skip to content

Check for Kernel::System::Web::Request in the plugin OTOBO::Perl::ParamObject #49

@bschmalhofer

Description

@bschmalhofer

The plugin OTOBO::Perl::ParamObject checks for occurrence of the string "ParamObject", probably intending to restrict the use of the param object. But modules don't have to use the name ! ParamObject". E.g in ./Kernel/System/SysConfig/ValueType/Entity/State.pm:

sub EntityLookupFromWebRequest {
    my ( $Self, %Param ) = @_;

    my $StateID = $Kernel::OM->Get('Kernel::System::Web::Request')->GetParam( Param => 'ID' ) // '';

    return if !$StateID;

    return $Kernel::OM->Get('Kernel::System::State')->StateLookup( StateID => $StateID );
}

I suggest to enhance the check to eally check for Kernel::System::Web::Request. It might also be sensible to turn that plugin into a Perl::Critic policy.

See also #44 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions