Search results for "module:Perl::Critic::Policy::BuiltinFunctions::ProhibitUniversalCan"
Perl::Critic::Policy::BuiltinFunctions::ProhibitUniversalCan - Write < eval { $foo-can($name) } >> instead of UNIVERSAL::can($foo, $name).
print UNIVERSAL::can($obj, 'Foo::Bar') ? 'yes' : 'no'; #not ok print eval { $obj->can('Foo::Bar') } ? 'yes' : 'no'; #ok As of Perl 5.9.3, the use of UNIVERSAL::can as a function has been deprecated and the method form is preferred instead. Formerly, ...
PETDANCE/Perl-Critic-1.152 - 17 Oct 2023 04:09:08 UTC
Perl::Critic::Policy::BuiltinFunctions::ProhibitUniversalIsa - Write < eval { $foo-isa($pkg) } >> instead of UNIVERSAL::isa($foo, $pkg).
print UNIVERSAL::isa($obj, 'Foo::Bar') ? 'yes' : 'no'; #not ok print eval { $obj->isa('Foo::Bar') } ? 'yes' : 'no'; #ok As of Perl 5.9.3, the use of "UNIVERSAL::isa" as a function has been deprecated and the method form is preferred instead. Formerly...
PETDANCE/Perl-Critic-1.152 - 17 Oct 2023 04:09:08 UTC