Thread Moose Delegation (7 answers)
Opened by rosti at 2014-04-16 18:55

GwenDragon
 2014-04-16 19:20
#174820 #174820
User since
2005-01-17
14749 Artikel
Admin1
[Homepage]
user image
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package Foo;

use Moose;
use CGI;
has 'cgi' => (
    isa => 'CGI',
    handles => ['header'],
    default => sub { CGI->new },
);

package main;

my $f = Foo->new();
print $f->header;

View full thread Moose Delegation