Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When a module has been assimilated into the language, the original module is still available in CPAN, but its use is deprecated. Do not import deprecated modules. It is perfectly valid to use their features, as they are now integrated into the core language.

...

Code Block
bgColor#ffcccc
langperl

use UNIVERSAL qw(can);  # deprecated

# ...

sub doit {
  my ($func) = @_;

  if (can($self, $func)) {
    $self->$func();
  }
  # ...
}

...

Code Block
bgColor#ccccff
langperl

# use UNIVERSAL qw(can);  # deprecated

# ... rest of code

...