Thread Stilfrage zum Klassenentwurf (10 answers)
Opened by rosti at 2011-05-15 19:33

rosti
 2011-05-15 19:33
#148639 #148639
User since
2011-03-19
3460 Artikel
BenutzerIn
[Homepage]
user image
hi,

worum es geht, zwei Möglichkeiten zur Anwendung einer neuen Klasse:

Code (perl): (dl )
1
2
3
4
5
6
7
# old style: create a object and invoke certain method
my $jdo = JDhash->new($date);
print $jdo->julianday, "\n";

# modern style: tie a hash and print the property
tie my %jd, 'JDhash', $date;
print $jd{julianday}, "\n";


Ich tendiere neuerdings zu Plan B ;)

Wie seht Ihr das??

View full thread Stilfrage zum Klassenentwurf