OOP ב Perl
אני מנסה לעשות משהו פשוט: המודול Circle.pm package Circle; sub new { my $self = {}; $self->{x} = undef; $self->{y} = undef; bless ($self); return $self; } שמוש במודול: script.pl use Circle; $c = circle->new(); בהרצה אני מקבל: Circle.pm did not return a true value at script.pl line 1. BEGIN failed--compilation aborted at script.pl line 1. מה הבעיה במודול? אני לא מצליח למצוא שום רמז ב man pages. (אני משתמש ב ActivePerl 5.8.1) תודה רבה.
אני מנסה לעשות משהו פשוט: המודול Circle.pm package Circle; sub new { my $self = {}; $self->{x} = undef; $self->{y} = undef; bless ($self); return $self; } שמוש במודול: script.pl use Circle; $c = circle->new(); בהרצה אני מקבל: Circle.pm did not return a true value at script.pl line 1. BEGIN failed--compilation aborted at script.pl line 1. מה הבעיה במודול? אני לא מצליח למצוא שום רמז ב man pages. (אני משתמש ב ActivePerl 5.8.1) תודה רבה.