Thread eq Operator überlagern (24 answers)
Opened by rosti at 2024-08-22 14:48

rosti
 2024-08-26 10:45
#196666 #196666
User since
2011-03-19
3492 Artikel
BenutzerIn
[Homepage]
user image
Zumindest haben wir schonmal Links und Rechts:

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use strict;
use warnings;

use overload bool => sub{
    my $self = shift;
    $self->{name};
};
use overload "==" => sub{
    my $lval = shift;
    my $rval = shift;
    print "Links: $lval, Rechts: $rval\n";
};

my $m = bless{name => 'Erwin'};

$m == "Franze";

View full thread eq Operator überlagern