Thread Probleme bei Vererbung
(17 answers)
Opened by tsy at 2008-03-17 18:11
Nun bin ich wieder bei meinem ersten Posting angelangt - er kann das new in der Klasse Person nicht finden! :-(
Code: (dl
)
Can't locate object method "new" via package "UserDomain::Benutzer" at C:/[...]/UserDomain/Benutzer.pm line 11, <DATA> line 228. Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 package UserDomain::Benutzer; #use base 'UserDomain::Person'; @ISA = qw(UserDomain::Person); use NET::ldap; use strict; sub new { my $class = shift; my ($id, $nachname, $vorname) = @_; $class->SUPER::new($id, $nachname, $vorname); $class->{'letzterLogin'} = ""; $class->{'berechtigung'} = 0; } wenn ich das Package direkt anspreche: Code (perl): (dl
)
$class->UserDomain::Person::new($id, $nachname, $vorname); führt zu Code: (dl
)
Can't locate object method "new" via package "UserDomain::Person" (perhaps you forgot to load "UserDomain::Person"?) at C:/[...]UserDomain/Benutzer.pm line 11, <DATA> line 228. --------------- noch mal die Ausgabe: Can't locate object method "new" via package "UserDomain::Benutzer" at C:/[...]/UserDomain/Benutzer.pm line 11, <DATA> line 228. Can't locate object method "new" via package "UserDomain::Person" (perhaps you forgot to load "UserDomain::Person"?) at C:/[...]UserDomain/Benutzer.pm line 11, <DATA> line 228. |