Thread keine Klassen in perl?! *heul* (13 answers)
Opened by Noisebreath at 2006-04-14 17:36

Ronnie
 2006-04-16 18:12
#64993 #64993
User since
2003-08-14
2022 Artikel
BenutzerIn
[default_avatar]
[quote=pq,16.04.2006, 15:37]hmm... Can't locate object method "child" via package "Foo"[/quote]
Du musst angeben das du Accessor haben willst:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl

use strict;
use warnings;

use Data::Dumper;

package Foo;
use Moose;
has 'parent' => (is => 'rw');
has 'child' => (is => 'rw');
1;

package main;
my $foo = Foo->new;
$foo->child('tick');
$foo->parent('donald');

die Dumper $foo;

View full thread keine Klassen in perl?! *heul*