Thread Unerwartetes Verhalten bei Operator überladen
(10 answers)
Opened by Muffi at 2012-08-21 17:05
funktioniert bei mir:
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 #!env perl use strict; use warnings; use Class::Date qw(date); print "Class::Date: ".$Class::Date::VERSION."\n"; print "Tie::Hash: ".$Tie::Hash::VERSION."\n"; print "OS: $^O\n"; print "PERL: ".(`env perl -v`)[1]."\n"; my %t; tie %t, 'TH'; $t{test} = date('2012-01-01'); print $t{test}." --> "; print $t{test}-=5; # standard hashverhalten package TH; use Tie::Hash; sub TIEHASH { my $self = {}; my $class = shift; bless $self, $class; } sub STORE { $_[0]->{$_[1]} = $_[2]; } sub FETCH { return $_[0]->{$_[1]}; } Code: (dl
)
1 Class::Date: 1.1.10 Last edited: 2012-08-30 17:10:49 +0200 (CEST) |