File: README

package info (click to toggle)
libclass-autoloadcan-perl 0.03-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 108 kB
  • ctags: 23
  • sloc: perl: 157; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 713 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
By default when you write an AUTOLOAD, the functions that are available
from it are not visible to UNIVERSAL::can.  Worse yet, if you try to use
AUTOLOAD in a subclass, you hide the AUTOLOAD in a superclass (or in
classes farther down the tree in multiple inheritance) so AUTOLOAD and
inheritance do not play well together.  See
http://www.perlmonks.org/?node_id=342804 for a full explanation of the
problems.

This module attempts to solve that.  Import this module somewhere in the
class hierarchy that you wish to have your AUTOLOAD, and write a CAN
which takes arguments and returns a function that will do that.  This
module will then provide an AUTOLOAD and UNIVERSAL::can that cooperate
and work properly.