User Tools

Site Tools


kurs:moose_inheritence

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

kurs:moose_inheritence [2014/09/10 21:22] (current)
Line 1: Line 1:
 +<​code>​
 +## Bla.pm
 +package Bla;
 +use Moose;
 +
 +
 +sub foo {
 +  my ($self) = shift;
 +  print "se foo\n";​
 +}
 +
 +1;
 +</​code>​
 +
 +<​code>​
 +## BlaExt.pm
 +package Bla;
 +use Moose;
 +
 +
 +sub foo {
 +  my ($self) = shift;
 +  print "se foo\n";​
 +}
 +
 +1;
 +</​code>​
 +
 +<​code>​
 +## use_bla.pl
 +use strict;
 +use warnings;
 +
 +use BlaExt;
 +
 +my $bla = BlaExt->​new();​
 +$bla->​foo;​
 +
 +## BlaExt::​foo();​ # won't work because Class Methods arent'​t inherited
 +
 +</​code>​
 +
 +
  
kurs/moose_inheritence.txt ยท Last modified: 2014/09/10 21:22 (external edit)