Help for this page

Select Code to Download


  1. or download this
    {   package Base;
        sub x { ... }
    ...
        our @ISA = 'Base';
        sub y { shift->x }
    }
    
  2. or download this
    package Package;
    sub y { shift->x }
    
  3. or download this
    {   package SomeRole;
        # Implementor must provide y
    ...
        our @ISA = 'SomeRole';
        sub x { ... }
    }
    
  4. or download this
    sub some_method {
        my ($self, $arg) = @_
    ...
        $arg->other_method();
        ...
    }
    
  5. or download this
    sub some_method {
        my ($self) = @_
    ...
        $self->attribute->other_method();
        ...
    }