Thread Anonyme Arrays miteinander vergleichen. (8 answers)
Opened by toby at 2006-08-28 02:29

Ronnie
 2006-08-29 20:27
#69271 #69271
User since
2003-08-14
2022 Artikel
BenutzerIn
[default_avatar]
@Crian: Danke, man kann das Ganze sogar noch etwas netter machen wenn man CPAN:overload verwendet:
Code: (dl )
1
2
3
4
5
6
7
8
# ...
package State;
use Moose;
use overload '==' => \&compare;

# ...
print "\$h1 is identical.\n" if $master == $h1;
print "\$h2 is identical.\n" if $master == $h2;
\n\n

<!--EDIT|Ronnie|1156868933-->

View full thread Anonyme Arrays miteinander vergleichen.