Приглашаем посетить
Некрасов (nekrasov-lit.ru)

Section 11.10.  Where We Are So Far...

Previous
Table of Contents
Next

11.10. Where We Are So Far...

So far, we've used the method arrow syntax:

Class->method(@args);

or the equivalent:

my $beast = 'Class';
$beast->method(@args);

which constructs an argument list of:

('Class', @args)

and attempts to invoke:

Class::method('Class', @args);

However, if Perl doesn't find Class::method, it examines @Class::ISA (recursively) to locate a package that does indeed contain method and then invokes that version instead.

Chapter 12 shows how to distinguish the individual animals by giving them associated properties, called instance variables.


Previous
Table of Contents
Next