The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Search results for "module:Perl::Critic::Policy::BuiltinFunctions::ProhibitUniversalIsa"

Perl::Critic::Policy::BuiltinFunctions::ProhibitUniversalIsa - Write < eval { $foo-isa($pkg) } >> instead of UNIVERSAL::isa($foo, $pkg). River stage three • 133 direct dependents • 408 total dependents

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

Perl::Critic::Policy::BuiltinFunctions::ProhibitUniversalCan - Write < eval { $foo-can($name) } >> instead of UNIVERSAL::can($foo, $name). River stage three • 133 direct dependents • 408 total dependents

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
2 results (0.051 seconds)