Help for this page

Select Code to Download


  1. or download this
    package Example::Phone {
      use Moo;
      has number => (is => 'ro', required => 1);
      sub call { ... }
    }
    
  2. or download this
    use Example::Phone;
    
    my $dad = Example::Phone->new(number => '+44 123 456 7890');
    say "Dad's number is ", $dad->number;
    $dad->call();
    
  3. or download this
    package Example::Phone::Mobile {
      use Moo;
      extends 'Example::Phone';
      sub send_sms { ... }
    }