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

rosti
 2014-04-16 18:55
#174819 #174819
User since
2011-03-19
3197 Artikel
BenutzerIn
[Homepage]
user image
Meine ersten Schritte:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package Foo;

use Moose;

has 'cgi' => (
    isa => 'CGI',
    handles => ['header'],
);


package main;

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


Das gibt:
Quote
Cannot delegate header to header because the value of cgi is not defined at C:/Perl/lib/Moose/Meta/Method/Delegation.pm line 99.
Foo::header('Foo=HASH(0x96b7c4)') called at C:\Dokumente und Einstellungen\rolf\Desktop\pack.pl line 20


Kann jemand mit der FM was anfangen?

View full thread Moose Delegation